Tag: zoom

how to make mapview zoom to 5 mile radius of current location

I know its a very common issue but I am not getting the exact answer for this thing. How to make MKMapView defaults to a zoom of a 5 mile radius of current location. Thanks in advance.

UIScrollView setZoomScale:animated messes scrollView aspect ratio

I am developing an app with a view that holds a UISCrollView, inside which is a UIImageView. When the view is about to appear, I perform a setZoomScale operation: -(void) viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; NSLog(@”bounds of current view”); NSLog(@”widht: %f, height: %f”, self.view.bounds.size.width,self.view.bounds.size.height); NSLog(@”size of the image”); NSLog(@”widht: %f, height: %f”, self.imageView.image.size.width,self.imageView.image.size.height); NSLog(@”size of the scrollView […]

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; […]