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

屏幕高度是896的Max和XR导航栏问题。修改isiPhone X 即可。 #31

Open
WolfSamWell opened this issue Sep 18, 2018 · 2 comments

Comments

@WolfSamWell
Copy link

见代码。 2个地方都要修改。
class func isIphoneX() -> Bool {
// return UIScreen.main.bounds.equalTo(CGRect(x: 0, y: 0, width: 375, height: 812))
if (UIScreen.main.bounds.height >= 812) { return true}
else{return false}
}

@joseph-517
Copy link

加上 UIDevice.current.userInterfaceIdiom == .phone
平板才會正常顯示
if (UIScreen.main.bounds.height >= 812 && UIDevice.current.userInterfaceIdiom == .phone) { return true}
else{return false}
}

@shen0607
Copy link

class func isIphoneX() -> Bool {
return UIScreen.main.bounds.equalTo(CGRect(x: 0, y: 0, width: 375, height: 812)) ||
UIScreen.main.bounds.equalTo(CGRect(x: 0, y: 0, width: 812, height: 375)) ||
UIScreen.main.bounds.equalTo(CGRect(x: 0, y: 0, width: 414, height: 896)) ||
UIScreen.main.bounds.equalTo(CGRect(x: 0, y: 0, width: 896, height: 414))
}

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

3 participants