TimOliver / TOCropViewController

A view controller for iOS that allows users to crop portions of UIImage objects
http://www.timoliver.com.au/2015/06/21/tocropviewcontroller-an-open-source-image-cropper-for-ios/
MIT License
4.74k stars 956 forks source link

xcode TOCropToolbar.m UIImage 7 error : Use of undeclared identifier 'UIImageSymbolConfiguration' #470

Open platinstudio opened 3 years ago

platinstudio commented 3 years ago

7 error in TOCropToolbar.m file

xcode: 10.1

1:


if (@available(iOS 13.0, *)) {
                    UIImage *image = button.imageView.image;
                    button.imageEdgeInsets = UIEdgeInsetsMake(0, 0, image.baselineOffsetFromBottom, 0);
                }'

error: Property 'baselineOffsetFromBottom' not found on object of type 'UIImage *'

2,3,4,5,6,7:

if (@available(iOS 13.0, *)) {
        return [UIImage systemImageNamed:@"checkmark"
                       withConfiguration:[UIImageSymbolConfiguration configurationWithWeight:UIImageSymbolWeightSemibold]];
    }

error: Use of undeclared identifier 'UIImageSymbolConfiguration'

?

TimOliver commented 3 years ago

Ah. I guess when I added that, I set Xcode 11 to be the base version that this library supports. It should be easy enough to convert that to defines instead.

Is there any particular reason why you're still using Xcode 10?

platinstudio commented 3 years ago

hi ! how to convert ? yes! my same library package just work in xcode 10

platinstudio commented 3 years ago

@TimOliver Do you have any suggestions?

JodiRaina commented 3 years ago

@pl4ten solve that?