send thumbnail image to another view for bigger image view - ios

i have 3 images in my display where i use CoreData to store them images and to view them in the display. Now i would like to touch these images and it goes large in another view. Ive tried using touch events bt nothing seems to work. Can anyone assist me please

You can put a transparent UIButton over the image and declare a IBAction on the button and get the image according to button tag. Then pass the image to next controller.

Related

IOS Swift UIImagePickerController. How to access the bounds of the live camera feed?

Trying to create an app that uses the UIImagePickerController for its picture taking activities. I'm using a cameraOverlayView to accomplish this (for now, it just contains two buttons, one for Taking/Keeping the Picture and the other one for Canceling/Retaking). The steps below outline what is occurring.
UIImagePickerController.view (with cameraOverlayView) is shown
I click "Shoot" and the imagePicker does its magic and I'm able to get an image out of it. However going past the image acquisition section (after I dismiss the custom view), the imagePicker goes onto "still" preview screen mode without any controls other than the "<" back button at the top of the screen. I'd like to avoid that and instead continue to use my custom view provided to the cameraOverlayView to handle "Keep/Retake" actions until I'm finished.
As you can see in the image above, there is "black" band at the bottom of the view with my two custom buttons in it. I have no idea how the black band gets there since I did not add it. My custom View only has the two buttons.
Attempting to add an UIImageView on the fly (to display a still preview of the image taken to the user while still keeping my action buttons) has the effect below .
The red arrow is pointing to an extra section below the UIImage I added after acquiring the picture data from the imagePicker.
That section is actually displaying the live preview the imagePicker is constantly producing.
What I'd like to accomplish is to be able to get the bounds of that live preview section being displayed so I can calculate the correct bounds of the UIImage I'm adding on the fly since getting the height correctly will absolutely fail when ported to different devices.
Any suggestions?

iOS: Thumbnail of taken picture

I'm trying to develop a screen like Status Update of facebook, when the user takes a picture, I want create a thumbnail and add to a component (I think UICollectionView). What is the best way to do this? I can't find anything on internet. Is the CollectionView the best component to handle this?
I'm already take a picture and thumbnail, but how to add to this component dynamically?
The camera button should open an image picker to invite the user to take a picture. The picker will invoke a delegate method (didFinishPickingMediaWithInfo:) that tells you it finished. The picked image is in the info dictionary (see the info dictionary keys at the bottom of the delegate reference). The VC can then extract the image from the result and scale it.

proper way to set background image to IPad App

I have a working IPad App. I built everything on a default white screen and I want to add an image to background of the image. I read a couple of articles and most of the suggest to create a new UIImage with the background image and stretch it to the full screen. I tried that but I am using a couple UIImage to display the photos taken and my UIImage s seem to stay at the back of the background and they don't get shown.
What is the proper way to set the background of IPad App?
this is the screenshot of my IPad App
Follow these steps :
1) Add UIImageView to your UIView.
2) Fill it with your Background UIImage.
3) Select your Background UIImageView and Select "Send to Back" Option....
The key is your view hierarchy. If you do not want to hassle around with moving the subviews along and sendings ome to back and some to front, then start with a proper view hierarchy from the beginning.
Basic rules are: the subviews overlay their superviews.
If siblings overlay each other, then the last one added is shown.
Your view hierarchy could be:
\UIView (A: the underlying self.view from the view controller's point of view.)
\UIImageView (B: the view for your background image. Empty or hidden from start.)
\UIView (C: Container for all of your views, no background color, no background image)
\UIImageView (C1: One of your picuters)
\UIImageView (C2: One of your picuters)
\UIImageView (C3: One of your picuters)
\UILabel (C4: One of your labels)
\ ...
Build up your view hierarchy. And when you need to add or change the background then assign the appropriate UIImage ot the View B.
Certainly, there is more than one way to achieve this. However, I personally thinkthat some proper view hierarchy works best, regardless whether you do that in IB or programmatically.
The proper way is to create a UIImageView and set it to the size of your view, and put all the others View in fron of it. The tutorials that you read are giving you the right way.
If you do not want to add an image, only a color you can set the background color of your view to this color.
You can use this code to send the ImageView to the back:
[self.view sendSubviewToBack:YouBackgroundImageView];
EDIT
Because you posted and XIB screenshot:
Your background image view must be in the first position, like this image:

How can i add the customized slider with previous and next buttons to the view in iphone?

In my app i need to display the slider,to scroll the view by view.(page by page).how can i?
I need to disply the slider as above image
You would have to subclass it and initialize it with that image or whatever image you want it to look like.

Open view controller with custom animation

I have an srollview with many images. After some image had touched I should open new view controller with this image and related images for image that was touched.
Now I use pushViewController.
So question is. Is it possible to open new viewController wiht zoom animation?
i.e. after user touched image, this image is zooming into the center of the screen (and this is new viewController already)
If it's possible please let me know with what I can realise it.
Thanks
I have good news and bad news for you. The good news is yes, it can be done! The bad news is that it can be complex.
The way I ended up doing it was as follows
when the user taps the image, you know what image to zoom, and you grab a reference and a frame
overlay a new view over the current view containing the scrollView, then add a NEW UIImageView containing another UIImage of the one the user tapped (could even be a higher resolution version)
animate that view to fill the screen (this image can be in a zoomable scrollview too, that's for future work!)
when you want to dismiss, you animate the frame down to be exactly whats in the scrollView, then you remove the overlay view
now users is more or less back to where they were before the tap

Resources