Closed michaelkoper closed 10 years ago
Is this needed in addition to Device.camera.front?
and Device.camera.rear?
?
https://github.com/rubymotion/BubbleWrap/blob/master/motion/core/device/ios/camera.rb#L27-L35
It is not really needed. It is just 1 function call instead of 2 which makes it more efficient.
I'd be okay with this if it were named something like Device.camera.available?
That is indeed a much better name :)
:thumbsup:
Thanks!
I was missing a method to check if there was a physical camera available (front or rear). This commit adds a method physical_camera? to the camera wrapper.
Device.camera.any? returns always true because it returns the photo library, which was kind of confusing for me.