0

I am having an issue with using the camera in iOS8. A section of my app allows the user to select an image from the camera roll or take one using the camera. If the user selects an image from the camera roll the app behaves as expected. But if the user takes a photo I get the following message in the console:

Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.

When I then dismiss the camera it crashes with the following:

[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'

I have seen that this may be an issue with iOS8 from searching online. Can anyone suggest any solutions?

Aish
  • 3
  • 1
  • 2

1 Answers1

0

I've look it up for you. One of the most likely solution is to set the modalPresentationStyle as below:

self.modalPresentationStyle = UIModalPresentationOverCurrentContext;

It would help if you post some of your code presenting the UIImagePickerController :]

And you may want to check this question.

Community
  • 1
  • 1
haopeng
  • 243
  • 1
  • 8