我在barButtonItem 处理程序方法中,我需要对导航控制器的引用。但我没有存储对导航控制器的引用。任何想法?
#import "ReportViewController.h"
#import "CenterViewAnimationUtility.h"
@implementation ReportViewController
- (void)viewDidLoad
{
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button addTarget:[CenterViewAnimationUtility class] action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside];
}
//next file ..
#import "CenterViewAnimationUtility.h"
@implementation CenterViewAnimationUtility
+ (void)buttonPressed:(UIBarButtonItem *)barButtonItem {
UINavigationController *navigationController = barButtonItem.//..
}