CWStatusBarNotification
CWStatusBarNotification copied to clipboard
iPhone X navigation bar style with text not centered
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.
Duplicate of #107.
@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.
@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:
@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.
When using CWNotificationStyleNavigationBarNotification
this is a simple and good looking workaround:
if (self.isPhoneX) {
notification.multiline = YES;
message = [@"\n\n" stringByAppendingString:message];
}