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

How to add MBSwitch as Bar Button Item #19

Open
bhartsb opened this issue Jul 20, 2016 · 1 comment
Open

How to add MBSwitch as Bar Button Item #19

bhartsb opened this issue Jul 20, 2016 · 1 comment

Comments

@bhartsb
Copy link

bhartsb commented Jul 20, 2016

How would one add MBSwitch as or into a Bar Button Item in the navigation bar? I've so far been unable to do this.

@bhartsb
Copy link
Author

bhartsb commented Jul 20, 2016

Seems to do it:
UIBarButtonItem *switchButtonBarItem = [[UIBarButtonItem alloc]initWithCustomView:_filterSwitch]; NSArray * a = [self.navigationItem.leftBarButtonItems arrayByAddingObject:switchButtonBarItem]; self.navigationItem.leftBarButtonItems = a;

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

1 participant