大家好我创建了一个自定义导航后退按钮,但是当我添加此代码时,我的后期动画无效并返回动画。为什么?我认为这取决于我的@selector动作!
- (void)viewDidLoad {
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button setImage:[UIImage imageNamed:@"goback.png"] forState:UIControlStateNormal];
[button addTarget:self action:@selector(//HERE ! i don't know put what thing !) forControlEvents:UIControlEventTouchUpInside];
[button setFrame:CGRectMake(0, 0, 32, 32)];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
}
答案 0 :(得分:3)
好吧我创建了一个功能并且工作正常:D:
-(void)pushNav {
[self.navigationController popViewControllerAnimated:YES];
}