Tag: zoom

Set minimum zoom level for UIImagePickerController cropping

I am using a UIImagePickerController to allow the user to upload a photo for use in my application. After selecting a photo to upload, the user is then prompted to crop his/her photo (since I have set imagePickerController.allowsEditing = YES). However, if the photo is landscape (i.e., wider than it is taller), it is currently […]

iphone uiscrollview and uiimageview – setting initial zoom

I use the following code to load an image into an scroll view. The image always loads at 100% zoom. Is there a way to set it to load to another zoom level, say .37? I have tried scrollView.zoomScale = .37 but it didnt seem to work UIImageView *tempImage = [[UIImageView alloc]initWithImage:[UIImage imageWithData:data]]; self.imageView = […]

Properly zooming a UIScrollView that contains many subviews

I created a zoomable UIScrollView and added 100 subviews to it (tiled). The view scrolls perfectly left and right. However, I’d like to allow zooming. To do so I read that my delegate needs to implement: – (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { return ???; } I have seen examples that have only one subview to zoom, […]

Cannot zoom in and out of nib in the new Interface Builder

Have I missed something obvious or is it not possible to zoom freely in and out of an open nib file, within the integrated Interface Builder of Xcode 4?

Pinch to zoom camera

I’m trying to make a pinch to zoom camera but I’m encountering two problems. First is that it allows the user to zoom way too much in and way to much out, secondly when I take a picture it doesn’t take it of the zoomed in view. Here is my code for the pinch function… […]

using iOS 6.0 SDK and building for iOS 5 Target causes UIScrollView setMinimumZoomScale to fail when running on iOS 5 simulator

i upgraded to Xcode 4.5 and have started using the iOS SDK 6.0: i have a universal app that had been developed with Xcode 4.4 and the iOS SDK 5.1 and it had been running on all devices and simulators tested without any glitches. in hope of having it continue to work on the iPhone […]

Using IBAction Buttons to Zoom MapView

I have an issue. My current location is displayed and centered in a map view however the map region doesn’t get zoomed in to. I tried taking Rob’s advice by taking span and region out of the didUpdateToLocation method but I must not have implemented it right. I don’t think it’s recognizing my call to […]

Objective-C iOS Crop Image Using Zoom?

I am trying to use this code to allow users to zoom and crop their images in my app: https://github.com/iosdeveloper/ImageCropper/tree/master/Classes/ImageCropper code snippet float zoomScale = 1.0 / [scrollView zoomScale]; CGRect rect; rect.origin.x = [scrollView contentOffset].x * zoomScale; rect.origin.y = [scrollView contentOffset].y * zoomScale; rect.size.width = [scrollView bounds].size.width * zoomScale; rect.size.height = [scrollView bounds].size.height * zoomScale; […]

detecting pinch to zoom on iOS

I am trying to detect a pinch to zoom event on iOS (and Android really) because I am using jQuery Mobile to show pages with a fixed header. In a dream world what I’d like is for the header not to zoom but for the rest of the page to do so. But I know […]

Turn off Zooming in UIScrollView

Does anyone know a way to temporarily turn off zooming when using a UIScrollView? I see that you can disable scrolling using the following: self.scrollView.scrollEnabled = false; but I’m not seeing a similar command for zooming. Any thoughts?