我在我的项目中使用 FlatUIKit。我有一个这样定义的自定义后退按钮:
[UIBarButtonItem configureFlatButtonsWithColor:[UIColor peterRiverColor]
highlightedColor:[UIColor belizeHoleColor]
cornerRadius:3
whenContainedIn:[UINavigationBar class], nil];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Back"
style:UIBarButtonItemStylePlain
target:self
action:@selector(clickBack)];
这是我的点击返回
-(void)clickBack{
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:self.navigationController.viewControllers.count-1] animated:YES];
}
该按钮按我的意愿出现,但仅此而已。如果我点击它,什么都不会发生。
知道我做错了什么吗?我对此很陌生,从未更换过后退按钮。