ios - How to use UIImagePickerController 's CameraOverlayView property in Simulator environment -
I was working on creating a custom camera overlay and installing it for UIImagePickerController's CameraOverlayView property.
But since I have not been enrolled in Apple's developer program, I can not really use and test the application package on the actual device.
I have my code debug and it appears that simulators you can not really choose and can not set ImagePicker.sourceType property UIImagePickerControllerSourceTypeCamera . Because the camera's functionality is not available on the simulator.
Am I right in my thinking?
Or am I missing something and the camera overlayview is a way to set up the property and test on the simulator?
Here is an example of my code:
- (IBAction) Le Picture: (ID) sender
{UIImagePickerController * imagePicker = [[UIImagePickerController alloc] init];
// Check supported on possible or simulator, otherwise, // a photo library if ([UIImagePickerController take isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) {ImagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; } If ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeSavedPhotosAlbum]) {imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; } Other {imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; } // Edit Permission [Image Setting Setting: Yes Animated: Yes]; [Image picture setaho: edits: yes]; ImagePicker.delegate = self; // Set custom overlay //imagePicker.cameraOverlayView = (not working in simulator) // display imagePicker on screen [self presentViewController: animated imagePicker: yes completion: zero]; }
You are right, the camera does not work iOS In the simulator.
Comments
Post a Comment