Skip to content

iOS 13 adaptation#11

Open
dengfeng520 wants to merge 1 commit intowindshg:masterfrom
dengfeng520:dev
Open

iOS 13 adaptation#11
dengfeng520 wants to merge 1 commit intowindshg:masterfrom
dengfeng520:dev

Conversation

@dengfeng520
Copy link

@dengfeng520 dengfeng520 commented Sep 26, 2019

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];

@dengfeng520 dengfeng520 changed the title iOS 13 适配 iOS 13 adaptation Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant