Wednesday 15 May 2013

ios - Can't back out of ABUnknownPersonViewController when adding person -


I'm having a problem ABUnknownPersonViewController is embedded in a navigation controller at the top, however, I use the navigation bar in my app:

  ABUnknownPersonViewController * Unknown PersonViewController = [[ABUnknownPersonViewController alloc] init]; Unknown PersonViewController.displayedPerson = (ABRecordRef) [Build Build Contact Contact]; UnknownPersonViewController.allowsAddingToAddressBook = Yes; UnknownPersonViewController.unknownPersonViewDelegate = self; UINavigationBar * navBar = [[UINavigationBar alloc] initWithFrame: CGRectMake (0, 0, [UIScreen main screen] .bounds.size.width, 41)]; NavBar.delegate = self; UINavigationItem * backItem = [[UINavigationItem alloc] initWithTitle: @ "back"]; [Navbar Push Navigation Item: Animated Backlight Animated: No]; UINavigationItem * topItem = [[UINavigationItem alloc] initWithTitle: @ "Your Title"]; [Navbar Push Navigation Insom: Top Ietam Animated: No]; TopItem.leftBarButtonItem = Zero; [Unknown PersonViewController.view adsview: navBar]; [Self. Navigation controller Push ViewController: Unknown PersonViewController Animated: Yes];   

Then it adds to a navigation bar, but the back button does nothing by changing the heading 'Title' ... very helpful additionally, no border of my navigation bar at the top Not so, I'm having some difficulty ... Images below ...

The navigation bar programmatically Added

 to return a minor problem while trying ... lol

You can try to present it in such a way. I'm not using a navigation bar in the main view. This will add a cancel button to the top left.

  ABUnknownPersonViewController * view = [[ABUnknownPersonViewController alloc] init]; See.View unknownView = self; // See the person's recorded data view.DisplayedPerson = person; See. AddingAdvertiserbook = Yes; UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController: view]; View.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemCancel Target: Auto Actions: @selector (Disarktactactiview) ;; [Self present ViewController: animated nav: yes complete: zero];    

No comments:

Post a Comment