ios - Perform Segue After Alert -
this using text alert , check matching data:
- (void)alertview:(uialertview *)alertview clickedbuttonatindex:(nsinteger)buttonindex { if (buttonindex == 1) { nsstring *passcode = [alertview textfieldatindex:0].text; //logic check match //... //... [self performseguewithidentifier:@"pushmcqview" sender:sender]; } }
i not understand need pass sender
in call. have tried self
, alertview
, , both times application crashes. if please explain role of sender
, , work in case, appreciate it.
thanks!
try this:
- (void)alertview:(uialertview *)alertview clickedbuttonatindex:(nsinteger)buttonindex { if (buttonindex == 1) { nsstring *passcode = [alertview textfieldatindex:0].text; //logic check match //... //... [self performseguewithidentifier:@"pushmcqview" sender:nil]; } }
sender reference action performing. in - (ibaction)submit:(id)sender
here sender button. can cast sender uibutton. hope helps.. :)
Comments
Post a Comment