【发布时间】:2012-05-12 07:48:46
【问题描述】:
我有这个非常简单的 Xcode 处理程序:
-(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesCancelled:touches withEvent:event];
NSLog(@"taxi touchcancelled");
NSString *postOption=NSLocalizedString(@"SELECTEDTAXI", @"");
NSString *info=NSLocalizedString(@"INFORMATION", @"");
NSString *call=NSLocalizedString(@"CALL", @"");
NSString *cancel=NSLocalizedString(@"CANCEL", @"");
NSLog(@"delegate=%@",myTA.delegate);
UIActionSheet *myActionSheet= [[UIActionSheet alloc] initWithTitle:postOption delegate:self cancelButtonTitle:cancel destructiveButtonTitle:call otherButtonTitles:info, nil];
//[myActionSheet showFromToolbar:myTA.delegate.myToolBar];
[myActionSheet showInView:myTA.delegate.view];
NSLog(@"after the show");
}
点击注释时应该显示一个actionSheet。 然而,在随机运行而不是显示工作表时,它会到达 showInView 命令并永远循环回到函数的开头。在其他时候,它可以无缝运行。 ActionSheet 有问题还是我做了什么很奇怪的事情?
【问题讨论】:
标签: xcode uiactionsheet touchescancelled