Skip to content

Commit

Permalink
- iphonex layout fix
Browse files Browse the repository at this point in the history
  • Loading branch information
prscms committed Sep 27, 2018
1 parent e1f3531 commit b98ad6e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ios/RNPhotoEditor.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ - (void)canceledEditing {
PhotoEditorViewController *photoEditor = [[PhotoEditorViewController alloc] initWithNibName:@"PhotoEditorViewController" bundle: [NSBundle bundleForClass:[PhotoEditorViewController class]]];

// Process Image for Editing
NSURL *url = [NSURL URLWithString:_editImagePath];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *image = [UIImage imageWithData:data];
UIImage *image = [UIImage imageWithContentsOfFile:_editImagePath];
if (image == nil) {
NSURL *url = [NSURL URLWithString:_editImagePath];
NSData *data = [NSData dataWithContentsOfURL:url];

image = [UIImage imageWithData:data];
}

photoEditor.image = image;

// Process Stickers
Expand Down

0 comments on commit b98ad6e

Please sign in to comment.