move removeFromSuperview to bottom

bugfix in iOS 8, show the right capture image
 version bump
This commit is contained in:
Ran Greenberg 2016-07-10 18:59:10 +03:00
parent 5b3d830673
commit 8a974c434f
2 changed files with 8 additions and 3 deletions

View File

@ -118,14 +118,18 @@ RCT_ENUM_CONVERTER(CKCameraZoomMode, (@{
- (void)removeFromSuperview
{
[super removeFromSuperview];
dispatch_async( self.sessionQueue, ^{
if ( self.setupResult == CKSetupResultSuccess ) {
[self.session stopRunning];
[self removeObservers];
}
} );
[super removeFromSuperview];
}
- (instancetype)initWithFrame:(CGRect)frame {
@ -446,7 +450,7 @@ RCT_ENUM_CONVERTER(CKCameraZoomMode, (@{
if (success) {
PHFetchResult *fetchResult = [PHAsset fetchAssetsWithMediaType:PHAssetMediaTypeImage options:self.fetchOptions];
PHAsset *lastImageAsset = [fetchResult lastObject];
PHAsset *lastImageAsset = [fetchResult firstObject];
if (lastImageAsset.localIdentifier) {
imageInfoDict[@"id"] = lastImageAsset.localIdentifier;
@ -691,6 +695,7 @@ RCT_ENUM_CONVERTER(CKCameraZoomMode, (@{
}
#pragma mark - observers

View File

@ -7,7 +7,7 @@
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"version": "1.0.10",
"version": "1.0.11",
"description": "Advanced native camera control with pre-defined aspect ratio, crop, etc",
"author": "Nataliia Hrankina <nataliag@wix.com>",
"nativePackage": true,