I am an iOS newbie. I have a navigation bar button which when clicked should execute a function of my own. What is the best way to do that?
UIBarButtonItem *doneBarButtonItem=[[UIBarButtonItem alloc] init];
doneBarButtonItem.title=@"Done";
self.navigationItem.rightBarButtonItem = doneBarButtonItem;
[doneBarButtonItem release];
See Question&Answers more detail:os