CNContactViewController forUnknownContact unusable, destroys interface

I’ve hidden the UINavigationController method for show or hide the navigation bar by using categories:

@interface UINavigationController (contacts)

@implementation UINavigationController (contacts)

- (void)setNavigationBarHidden:(BOOL)hidden animated:(BOOL)animated {
    NSLog(@"Hide: %d", hidden);

This way the CNContactViewController cannot make the navigation bar to disappear. Setting a breakpoint on NSLog I discovered that this method is called by the private [CNContactViewController isPresentingFullscreen:].

By checking if the self.topViewController of the navigation controller is kind of class CNContactViewController you could decide if hiding or not the navigation bar.

Leave a Comment