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

Devices with screen 5.5 inch have isNotched true #25

Open
prisacariugeorge opened this issue Dec 9, 2020 · 1 comment
Open

Devices with screen 5.5 inch have isNotched true #25

prisacariugeorge opened this issue Dec 9, 2020 · 1 comment

Comments

@prisacariugeorge
Copy link

Devices with
case .phone6Plus,
.phone6SPlus,
.phone7Plus,
.phone8Plus:
return .inches_5_5

Don't have notch and they are in the static public var isNotched: Bool check

@victormihaita
Copy link

victormihaita commented Jan 28, 2021

This is a hotfix for this problem:

extension Device {
    static public var isNotched: Bool {
        return isPhone &&
            (screen == .inches_5_8 ||
                screen == .inches_6_1 ||
                screen == .inches_6_5 ||
                screen == .inches_5_4 ||
                screen == .inches_5_5 ||
                screen == .inches_6_7) &&
            !(version == .phone8Plus ||
                version == .phone7Plus ||
                version == .phone6SPlus ||
                version == .phone6Plus)
    }
}

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