CWStatusBarNotification icon indicating copy to clipboard operation
CWStatusBarNotification copied to clipboard

iPhone X navigation bar style with text not centered

Open pipizanzibar opened this issue 7 years ago • 6 comments

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.

pipizanzibar avatar Oct 14 '17 11:10 pipizanzibar

68747470733a2f2f692e696d6775722e636f6d2f375851745737662e6a7067

Tulleb avatar Oct 18 '17 14:10 Tulleb

Duplicate of #107.

Tulleb avatar Oct 18 '17 14:10 Tulleb

@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 avatar Oct 23 '17 05:10 qizh

@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

Tulleb avatar Oct 23 '17 07:10 Tulleb

@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.

qizh avatar Oct 23 '17 12:10 qizh

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

pres avatar Nov 26 '17 13:11 pres