Pregunta

In my app I have hidden the status bar and increased the navigation bar height by using navigation bar category. Using:

@implementation UINavigationBar (customNav)

- (CGSize)sizeThatFits:(CGSize)size {
    CGSize newSize = CGSizeMake(self.frame.size.width, 64);
    return newSize;
}

@end

so the view looks like:

enter image description here

Problem arises when I show the MFMessageComposeViewController view on top, maybe its assuming that the status bar is there and showing a black background:

enter image description here

Any work around or proper solution to fix this?

UPDATE: As per solution from this I am hiding/showing status bar. But the black strip is still there (with same height as it is). Also tried by undoing the category on uinavigationbar. So the issue is not with the status bar and the custom navigationbar. What I am observing here is that black strip is at a place where the recipient numbers are supposed to be shown. Is there something that I am not using properly?

Note: the navigation bar i am using is opaque, not translucent

enter image description here

¿Fue útil?

Solución

it was due to this:

[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:...] forBarMetrics:UIBarMetricsDefault];

answer here

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top