【发布时间】:2012-12-28 11:08:11
【问题描述】:
默认情况下,通行证加载到PKAddPassesViewController。有什么方法可以知道在视图上按下了哪个按钮。
//this method runs when user either click on the cancel or add button
-(void)addPassesViewControllerDidFinish: (PKAddPassesViewController*) controller
{
[self dismissViewControllerAnimated:YES completion:nil];
}
我想获取在PKAddPassesViewController 中按下的按钮的标题。我已尝试使用以下代码来访问标题,但我得到了null。
NSLog(@"Title of button %@",controller.navigationController.navigationItem.rightBarButtonItem.title);
【问题讨论】: