Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Connect] Adding a BarButtonItem to NavigationBar #42

Closed
SNagra opened this issue May 12, 2016 · 3 comments
Closed

[Connect] Adding a BarButtonItem to NavigationBar #42

SNagra opened this issue May 12, 2016 · 3 comments

Comments

@SNagra
Copy link

SNagra commented May 12, 2016

Is there is recommended way to add a BarButtonItem to the NavigationBar of the detailed view of the Connect View (after clicking on a contact)?

1

@YuanZhu-apple
Copy link
Contributor

Can you try this?

UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemDone target:self action:@selector(myAction:)];      
[connectViewController.navigationItem setLeftBarButtonItem:leftBarButton animated:NO];

@SNagra
Copy link
Author

SNagra commented May 18, 2016

I believe this only adds the Bar Button Item to the Table View that lists all the contacts, I only want the button to show up in the Detail View, as shown in the photo above.

@YuanZhu-apple
Copy link
Contributor

@SNagra https://developer.apple.com/library/ios/documentation/UIKit/Reference/UINavigationControllerDelegate_Protocol/index.html#//apple_ref/doc/uid/TP40007662

Implement this delegate to add button when detail page view controller is pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants