For the first marker point, I assume that you can use the cameraOverlayView property of the UIImagePickerController to add a user interface to the default interface:
- (IBAction)pick:(id)sender { NSLog(@"abc"); picker = [[UIImagePickerController alloc] init]; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { [picker setSourceType:UIImagePickerControllerSourceTypeCamera]; } else { [picker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; }
EDIT
I tested the UIImagePickerController and returns the image with its full dimensions (PixelXDimension and PixelYDimension):
UIImagePickerControllerMediaMetadata = { DPIHeight = 72; DPIWidth = 72; Orientation = 6; "{Exif}" = { ApertureValue = "2.526068811667588"; BrightnessValue = "-0.5779073354035674"; ColorSpace = 1; DateTimeDigitized = "2013:04:07 22:30:03"; DateTimeOriginal = "2013:04:07 22:30:03"; ExposureMode = 0; ExposureProgram = 2; ExposureTime = "0.05882352941176471"; FNumber = "2.4"; Flash = 24; FocalLenIn35mmFilm = 35; FocalLength = "4.28"; ISOSpeedRatings = ( 800 ); MeteringMode = 3; PixelXDimension = 3264; PixelYDimension = 2448; SceneType = 1; SensingMethod = 2; ShutterSpeedValue = "4.058893689053568"; SubjectArea = ( 1874, 1478, 610, 612 ); WhiteBalance = 0; }; "{TIFF}" = { DateTime = "2013:04:07 22:30:03"; Make = Apple; Model = "iPhone 4S"; Software = "6.1.3"; XResolution = 72; YResolution = 72; }; };
EDIT
You can also set the content mode for your image to resize and match the look of the container:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [self dismissViewControllerAnimated:YES completion:nil]; UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage]; [imageView setContentMode:UIViewContentModeScaleAspectFill]; [imageView setImage:image]; }
and after that, to fit the imageView as you need, you look at the controller based on the device screen (4 inches or not) using auto layout or auto sizing .
source share