iOS Xcode issue with CameraViewController when I click on a photo to choose it -


Expecting for some insights when I run simulator on iPhone 6 iOS 8 or iPhone 4S iOS 8.0.2 , Then I have a problem with the encoded app. The problem is that when I click on my photos tab, the image picker code works fine in both situations (camera simulator for accessing camera ViU controller and Photo Library for Camera)

  - (zero) ViewVillagePaper: (BOOL) Animated [[Super Viewer: Animated]; _imagePicker = [[UIImagePickerController alloc] init]; Self.imagePicker.delegate = self; Self.imagePicker.allowsEditing = Yes; If ([UIImagePickerControllerSourceType is available: UIImagePickerControllerSourceTypeCamera]) {self.imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; } And {self.imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; } Self.imagePicker.mediaTypes = [NSArray arrayWithObjects: (NSString *) kUTTypeImage, zero]; [Self-present ViewController: animated self.imagePicker: not complete: zero]; }   

Then when I click on a photo in the simulator or take a photo with my iPhone and click on the picture of the use, the selected image and the field to be edited will be split Seconds appear for the second

  - (zero) imagePickerController:  

(UIImagePickerController *) picker didFinishPickingMediaWithInfo: (NSDictionary *) information {UIImage * SelectedImage = info [UIImagePickerControllerEditedImage]; Self.chosenImageView.image = selectedImage; [Self dismissViewControllerAnimated: Yes complete: zero];}

In case of additional additional information you need it: My Excode 6.0.1 is My Base SDK's latest iOS (iOS 8.0) My Deployment Target 7.1

I have not changed any of these other than my notified when notified

Any insights to fix this issue would be greatly appreciated.

Grazi

T That's the only problem I can see is that you are presenting UIImagePickerContoller on ViewWillAppear or I can say that you have a ViewWillAppear .

ViewWellPropier will be activated every time the View Controller is activated, it is leading your app in the loop to select the image because when called didFinishPickingMediaWithInfo Then UIImagePickerController will be canceled when ViewWillAppear will be called again. Try transferring code other than ViewWillAppear .

Place BREAK POINT on ViewWillAppear to see your code.

You can do a button or something like this and write the same code in your -mection , which you have written in ViewWillAppear .

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

java - Session timeout does't work vaadin -