iPhone - Detecting if the iDevice has a front camera -
apple recommends not searching hardware version, specific feature in interested.
so how may detect if there front camera on device able disable features ?
[uiimagepickercontroller issourcetypeavailable: uiimagepickercontrollersourcetypecamera] tells there camera somewhere.
try method of uiimagepickercontroller:
+ (bool)iscameradeviceavailable:(uiimagepickercontrollercameradevice)cameradevice
this class method , uiimagepickercontrollercameradevice can take 2 values:
uiimagepickercontrollercameradevicerearuiimagepickercontrollercameradevicefront
example code:
if( [uiimagepickercontroller iscameradeviceavailable: uiimagepickercontrollercameradevicefront ]) { // } note available ios 4.0 , later.
Comments
Post a Comment