diff --git a/ios/Classes/ImageCropperPlugin.m b/ios/Classes/ImageCropperPlugin.m index a1049295..d77532ee 100644 --- a/ios/Classes/ImageCropperPlugin.m +++ b/ios/Classes/ImageCropperPlugin.m @@ -73,8 +73,6 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { } cropViewController.allowedAspectRatios = allowedAspectRatios; - [self setupUiCustomizedOptions:call.arguments forViewController:cropViewController]; - if (ratioX != (id)[NSNull null] && ratioY != (id)[NSNull null]) { cropViewController.customAspectRatio = CGSizeMake([ratioX floatValue], [ratioY floatValue]); cropViewController.resetAspectRatioEnabled = NO; @@ -83,6 +81,8 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { cropViewController.aspectRatioLockEnabled = YES; } + [self setupUiCustomizedOptions:call.arguments forViewController:cropViewController]; + [_viewController presentViewController:cropViewController animated:YES completion:nil]; } else { result(FlutterMethodNotImplemented);