문제

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