bugfix - support for iOS8 "fetchOptions.fetchLimit"
This commit is contained in:
parent
63f650ef54
commit
2ffbacca08
|
@ -93,7 +93,7 @@ export default class CameraScreen extends Component {
|
|||
}
|
||||
|
||||
async onSwitchCameraPressed() {
|
||||
const success = await this.camera.changeCamera();
|
||||
const success = await this.camera.changeCamera();
|
||||
}
|
||||
|
||||
async onCheckAuthoPressed() {
|
||||
|
@ -107,7 +107,8 @@ export default class CameraScreen extends Component {
|
|||
}
|
||||
|
||||
async onSetFlash(flashMode) {
|
||||
const success = await this.camera.setFleshMode(flashMode);
|
||||
const success = await this.camera.setFlashMode(flashMode);
|
||||
|
||||
}
|
||||
|
||||
async onTakeIt() {
|
||||
|
|
|
@ -101,7 +101,10 @@ RCT_ENUM_CONVERTER(CKCameraZoomMode, (@{
|
|||
if (!_fetchOptions) {
|
||||
PHFetchOptions *fetchOptions = [PHFetchOptions new];
|
||||
fetchOptions.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:NO]];
|
||||
fetchOptions.fetchLimit = 1;
|
||||
// iOS 9+
|
||||
if ([fetchOptions respondsToSelector:@selector(fetchLimit)]) {
|
||||
fetchOptions.fetchLimit = 1;
|
||||
}
|
||||
_fetchOptions = fetchOptions;
|
||||
}
|
||||
return _fetchOptions;
|
||||
|
|
Loading…
Reference in New Issue