Domanda

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?

Nessuna soluzione corretta

Altri suggerimenti

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top