Expand image to full screen on touch in iOS - ios5

I want to accomplish this:
Load a UIViewController with a image in some part of it. The image should be a little smaller than the original and also cropped in top and botton and when touch on it to animate into full screen.
Something like JetSetter app does

Related

Changing View size using user touch input

I want to change my view size using user touch input.
What I know and will be trying is using TouchesMoved method and then finding the nearest vertex of the view to the touch, make the view increase in that direction using animation.
But there are few problems I have before I start.
1) The camera app has same functionality in cropping photo. There is a grid displaying actual crop area. I don't know how to display that grid. I don't have any knowledge of opengl. I would like to have that as a indication of user is in edit mode?
2) The camera app crop functionality is also of changing the size using user touch input but it only changes view size, if the touch is near the four vertices of the view. From what I know there is a method to check if the touch is in a specific rect CGRectContainsPoint but how do I filter it to bounds of the view?
Edit
I tried yinkou answer, downloaded from Git.
Now the real question is in the git Xcode project. There is a view which has image as a contentView and if user drag that view, the image also changes shape based on view resizing.
I am doing this in a camera app. I attached AVCaptureVideoPreviewLayer as a contentView. Now my view is resizing but the AVCaptureVideoPreviewLayer stays the same size. Am I doing something wrong or is it that AVCaptureVideoPreviewLayer won't increase?
And happily, there's a control out there:
https://github.com/spoletto/SPUserResizableView

moving across an image-that larger than screen size

I was asked in our company to take an image that is larger than iphone screen size, and it has to be a background screen, and move (horizon) . so user see an image that moves from right to left by it self as a moving background.
i will be happy for any information on how to do that with xcode only .
i think i know how to animate images, but this shuld be bigger that screen size and move across one wide image as a camera ..
Use a UIScrollView and add the image view as a subview of the scrollView.

iPhone - scrolling a UISCrollview to keep objects moving

I have a UISCrollview. Inside this scroller I have a picture and over the picture I have some objects (as subviews of the picture), like layers in a Photoshop composition. So, if I zoom the picture, the objects will zoom. If I scroll the picture, the objects scroll.
Now consider this: I have the picture zoomed in. The picture is now larger than the iPad screen. I am seeing the top half of the picture. I touch an object that is over the picture and start dragging it to the bottom of the screen. My intent is to drop the dragged object at the bottom of the picture, but as the picture is zoomed in, I have to drag the element to bottom of the screen, release it, scroll the picture up and then continue dragging the object.
What I want is this: I start dragging and when I arrive at the boundary of the screen, the scroller starts scrolling automatically showing parts of the image that were down or up.
What do I need is to know the rect that is visible, a kind of inverse of scrollRectToVisible...
Considering that the picture can be zoomed at any level, how do I know if the element I am dragging is near the border. BTW, how do I know what part of the scroller is being shown, even if it is zoomed?
thanks.
The visible rectangle has a size of scrollView.bounds.size and an origin of scrollView.contentOffset, in the coordinate space of the scrollview. Depending on what exactly you are doing, you may need to use convertRect:fromView: or convertRect:toView: to convert it into the coordinate space of the zoomed view.

Image looks blurry after start of the app

I use an image with some buttons on it in my iPad split view app. When the app starts in portrait mode, the image looks a bit blurry. When I rotate it to landscape and back to portrait, it looks crisp.
Why?
Your UIImageView has certainly an autoresizingMask that make it being placed at, for example, 0.5;0.5, or being resized so that your image is scaled.
In interface builder, under the Size Inspector (ruller icon), try tweaking parameters to get the effect you want

UIImageView, UIView, taking a segment of a picture

I want to take an image from the UIImagePickerController and put it on a UIImageView that can move based on touch. I'm not sure how to get the picture onto the UIImageView. I thought the UIImageView automatically resizes the picture, so I couldn't grab just the top half of the picture and put that on the UIImageView. Is there an easy way to do this? thanks!
Use CGImageCreateWithImageInRect to crop (take a segment of?) a picture. Put a UIImageView inside a UIScrollView to let the user scroll through (move based on touch) a large image.
if you want to move and zoom your picture in a view, you need to use a UIScrollView. See Apple's ScrollViewSuite example. If you simply want to position the picture within a UIImageView, set the contentMode of the UIImageView to the setting you want e.g. scale, top, left, etc. See the UIImageView documentation for all options.