I would like to call an action when my backButton is clicked but this doesn't seem to be it.
viewDidLoad
in rootViewController:
self.navigationItem.backBarButtonItem = [[[UIBarButtonItem alloc]
initWithTitle:@"Logout"
style:UIBarButtonItemStyleDone
target:self
action:@selector(logout)] autorelease];
The title of it is correct but nothing happens.
logout
(in the rootViewController)
header:
-(void)logout;
body:
-(void)logout {
NSLog(@"test");
[[User owner] logout];
}
Could anyone tell me how to solve this, since i have no idea. Thanks