UIBarButtonItem *rButton =[[UIBarButtonItem alloc] init];
rButton.title= @"someText";
[rButton setTarget:self];
[rButton setAction:@selector(aMethod)]; //aMethod defined in the class
self.navigationItem.rightBarButtonItem=rButton;
Tested & working in my project!
Happy Coding :)
I think this site is really awesome and informational to me and i am also gonna share this to my friends. Thanks for such nice information's.
ReplyDeletethanks, I wish I could keep it up to date and more informational... Happy Coding!
Delete