2012-05-12 23 views
0

我有這個非常簡單的Xcode的處理程序:環流式touchCancelled上actionSheet顯示

-(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越野車還是我做了一些非常奇怪的事情?

回答

0

我收到了關於鏈接組的建議,該組似乎通過延遲對showInview的調用來完成工作。