ios - Code changes behavior after upgrading sdk? -
i'm trying optimized app ios 7 still target ios 6.
i had 2 textfield email input validate, fails.
i did that:
if ([email.text isequaltostring:confirm_email.text]) { //process } else{ //display mismatch error uialertview * alertview = [[uialertview alloc] initwithtitle:@"email mismatch" message:@"your email not match confirmation!" delegate:self cancelbuttontitle:@"ok" otherbuttontitles:nil, nil]; [alertview show]; } now not work in ios 6 ios 7 , display error. didnt touch code, im not sure why behavior changed.
if uitextfield doesn't have user text returns nil on ios 7 empty string (@"") on ios 6. behavior seeing because if either text field in [email.text isequaltostring:confirm_email.text] nil evaluate no.
Comments
Post a Comment