Detect when Viewcontroller was Pushed

Viewed 6319

I am trying to detect when a ViewController was pushed. So I followed the doc of Apple http://developer.apple.com/library/ios/#documentation/uikit/reference/UINavigationBarDelegate_Protocol/Reference/Reference.html , about NavegationBar delegate but I didn´t figured out how to make it working successfully. I placed on my code the following code in my ViewController but it doesn't detect it was pushing. What I am doing wrong ?

- (void)navigationBar:(UINavigationBar *)navigationBar didPushItem:(UINavigationItem *)item, {
    NSLog(@"didPushItem: %@", item);
    [self showimage];
}
3 Answers
Related