Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safeAreaInsets此对象 IOS11系统才有 希望作者判断下系统 #3

Closed
Yishuhong opened this issue Jul 25, 2019 · 0 comments
Closed

Comments

@Yishuhong
Copy link

    if (@available(iOS 11.0, *)) {
        make.top.equalTo(@((CGFloat)(([UIApplication sharedApplication].keyWindow.safeAreaInsets.top) + self.topSpace)));
    } else {
        make.top.equalTo(@((CGFloat)(([UIApplication sharedApplication].keyWindow.layoutMargins.top) + self.topSpace)));
    }
@Vesincc Vesincc closed this as completed Oct 11, 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

No branches or pull requests

2 participants