I have this very simple Xcode handler:

-(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");

}

that should visualize an actionSheet upon clicking on an annotation. Yet at random runs instead of displaying the sheet, it gets to the showInView command and loops back to the beginning of the function forever. At other times it works seamlessly. Is the ActionSheet buggy or did I do something very weird?

没有正确的解决方案

其他提示

I received a suggestion on a linked in group that seems to do the job by delaying the call to showInview.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top