windshg / VPImageCropper

Image cropper like the one in WeChat
Apache License 2.0
584 stars 129 forks source link

iOS 13 adaptation #11

Open dengfeng520 opened 4 years ago

dengfeng520 commented 4 years ago

1、Fix the problem of demo build failed on Xcode 11. 2、Fix the iOS 13 system, after presentViewController, the bottom of the Cancel and confirmBtn buttons do not display the issues. I use NSLayoutConstraint , I think this is compatible with some phones before iPhone X.

   cancelBtn.translatesAutoresizingMaskIntoConstraints = false;
    [[cancelBtn.leftAnchor constraintEqualToAnchor:self.view.leftAnchor constant:0] setActive:true];
    if (@available(iOS 11.0, *)) {
        [[cancelBtn.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor constant:0] setActive:true];
    } else {
        [[cancelBtn.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor constant:0] setActive:true];
    }
    [[cancelBtn.widthAnchor constraintEqualToConstant:100] setActive:true];
    [[cancelBtn.heightAnchor constraintEqualToConstant:50] setActive:true];