Hi
I'm currently doing this to add a button to my navigation bar to call the SwitchViews method.
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Back to App"
style:UIBarButtonItemStyleBordered
target:nil
action:@selector(switchViews:)];
self.navigationItem.leftBarButtonItem=backButton;
[backButton release];
This method happens to be in another class (SwitchViewController) but it is working as I guess the method call goes through the responder chain until it finds it in SwitchViewController.
Is there any way that I can set the target to my class instead of nil?
Guess that would make the code easier to read, debug and maintain.
I'm sure it's a simple answer to some more experienced programmers than me...
Thanks