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

iPhone X navigation bar style with text not centered #110

Open
pipizanzibar opened this issue Oct 14, 2017 · 6 comments
Open

iPhone X navigation bar style with text not centered #110

pipizanzibar opened this issue Oct 14, 2017 · 6 comments

Comments

@pipizanzibar
Copy link

The text in the notification should be vertically centered in the navigation bar, but referring to the notch.
Actually it is centered referring to both the notch and the status bar and the result is a terrible vertical offset in the text in the iPhone X notification.

@Tulleb
Copy link

Tulleb commented Oct 18, 2017

68747470733a2f2f692e696d6775722e636f6d2f375851745737662e6a7067

@Tulleb
Copy link

Tulleb commented Oct 18, 2017

Duplicate of #107.

@qizh
Copy link

qizh commented Oct 23, 2017

@Tulleb, but it's not a duplicate. This Issue was created as a part of discussion in #107. And probably solving this issue might be the only workaround for iPhone X for now.

@Tulleb
Copy link

Tulleb commented Oct 23, 2017

@qizh if we already talk about this in #107, then this one is a duplicate, isn't it? Anyway I got it "fixed" in my fork and here is what it look like when adding an inset on the top of the label to get it displayed on the very small part of status bar left:
screen shot 2017-10-23 at 09 23 03

@qizh
Copy link

qizh commented Oct 23, 2017

@Tulleb, I understand it's not the best way to handle iPhone X notch but it's better than nothing. In one of my apps I only show notifications that cover whole navigation bar and this inset is everything I need.

Also in case there will be no good solution for notch issue, we can use this "fix" for some apps and switch to another notifications way for others.

@pres
Copy link

pres commented Nov 26, 2017

When using CWNotificationStyleNavigationBarNotification this is a simple and good looking workaround:

    if (self.isPhoneX) {
        notification.multiline = YES;
        message = [@"\n\n" stringByAppendingString:message];
   }

screen shot 2017-11-26 at 14 21 07

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

4 participants