Skip to content

Instantly share code, notes, and snippets.

@vikage
Last active November 16, 2016 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vikage/269d21c1c2f9299054b835817112d8cd to your computer and use it in GitHub Desktop.
Save vikage/269d21c1c2f9299054b835817112d8cd to your computer and use it in GitHub Desktop.
-(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
for (UIView *v in viewController.view.subviews)
{
NSLog(@"%@",[v class]);
if ([v isKindOfClass:[NSClassFromString(@"CMKBottomBar") class]])
{
SEL se = NSSelectorFromString(@"cancelButton");
// method
if ([v respondsToSelector:se])
{
UIButton *cancelButton = [v performSelector:se];
[cancelButton setTitle:@"New title" forState:UIControlStateNormal];
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment