objective c - touchesBegan not called after dismissing UIAlertView in Cocos2d v3 -
after showing , dismissing uialertview in ccscene touchbegan stops responding. ccbutton still respond touches , if tap ccbutton after dismissing uialertview touchbegan starts working again.
here touchbegan doesn't register touches after alert until press ccbutton
-(void) touchbegan:(uitouch *)touch withevent:(uievent *)event { cgpoint touchloc = [touch locationinnode:self]; nslog(@"touchbegan"); }
create uialertview
- (void)showalert { uialertview *alert = [[uialertview alloc] initwithtitle:@"name" message:@"enter name" delegate:self cancelbuttontitle:@"done" otherbuttontitles:nil]; [alert settag:1]; alert.alertviewstyle = uialertviewstyleplaintextinput; [alert show]; }
alert dismissed
- (void)alertview:(uialertview *)alertview diddismisswithbuttonindex (nsinteger)buttonindex { if (alertview.tag == 1) { uitextfield *textfield = [alertview textfieldatindex:0]; player.name = textfield.text; } }
this type of thing seemed work fine under cocos2d v2.x using cctouchbegan. missing?
Comments
Post a Comment