0

I have been suffering from the common issues discussed at length in this post:

UIImagePickerController error: Snapshotting a view that has not been rendered results in an empty snapshot in iOS 7

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.

I have tried the various workarounds discussed in that thread but to no avail. The issues I have now are:

  • If I clean and build the app then the first time that the camera is utilised it allows me to take a photo
  • Every attempt to take a photo thereafter fails:
    • If I try to take another photo the camera freezes
    • If I close the app and reopen it and try to take another photo, pressing the capture button does not do anything
  • Using custom controls (i.e. completely customizing camera capture behaviour) gives rise to a warning in the console camera is not ready.

    [picker takePhoto];
    

I am testing on an iPhone 4 with iOS 7.1 installed, XCode 5 with version 7.1 of the SDK.

This occurs when running the app and when installed the app via an archived build.

Interestingly the most recent post on the above-mentioned thread suggests that similar problems occur with Apple's own Photobucket example (UIImagePickerController error: Snapshotting a view that has not been rendered results in an empty snapshot in iOS 7)

Any other suggestions would be welcome. A solution built using AVFoundation may be viable if the effort is warranted, i.e. if the above-mentioned issues are specifically UIImagePickerController -related and not because my hardware is crap or I've overlooked something.

Community
  • 1
  • 1
dianovich
  • 2,288
  • 21
  • 34

1 Answers1

0

Appreciate I didn't give any concrete examples here - it was a case of I have exhausted the UIImagePickerController workarounds give me some inspiration and hair-pulling.

Creating a still-photo capture feature using AVFoundation proved more flexible, less resource-intensive and seems to be less problematic than the out-of-the-box UIImagePickerController.

This thread is useful if you decide to go down that route:

https://stackoverflow.com/a/5667775/1526144

Community
  • 1
  • 1
dianovich
  • 2,288
  • 21
  • 34