From 426b046269c98fc045e707e9f776078c9fdda68a Mon Sep 17 00:00:00 2001 From: RamNalluri Date: Mon, 1 Apr 2024 17:06:07 +0530 Subject: [PATCH] Update IDMPhotoBrowser.m Fixed crash issue on iOS 17 --- Classes/IDMPhotoBrowser.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/IDMPhotoBrowser.m b/Classes/IDMPhotoBrowser.m index 9cd39f32..c61e631e 100644 --- a/Classes/IDMPhotoBrowser.m +++ b/Classes/IDMPhotoBrowser.m @@ -574,7 +574,8 @@ - (CGRect)getToolbarButtonFrame:(UIImage *)image{ } - (UIImage*)getImageFromView:(UIView *)view { - UIGraphicsBeginImageContextWithOptions(view.bounds.size, YES, 2); + //UIGraphicsBeginImageContextWithOptions(view.bounds.size, YES, 2); + [[UIGraphicsImageRenderer alloc] initWithSize:view.bounds.size format:UIGraphicsImageRendererFormat.defaultFormat]; [view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();