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

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -