ios - Condition not behaving properly at iPad -
in app, have if-else condition issue condition behaving on simulator (iphone ipad) , iphone device not behaving on ipad device. possible solve issue?
if (_loginforcodriver ) { nsstring *name=[[appdelegate.coderiverdetailarr objectatindex:0] objectforkey:@"name"]; nsstring *password=[[appdelegate.coderiverdetailarr objectatindex:0] objectforkey:@"driver_pass"]; //[[appdelegate.coderiverdetailarr objectatindex:0] objectforkey:@"driver_pass"]; if ((usernametext.text==name) && (passwordtext.text==password) ) { [self logoutapi]; //modestr=@"logging"; [progresshud show:@"please wait..." interaction:no]; //https://mobile.epgsolutions.net/ // nsstring *strurl =[nsstring stringwithformat:@"http://projects.udaantechnologies.com/epg_services/user_login.php"]; nsstring *strurl =[nsstring stringwithformat:@"%@%@",_baseurl,@"user_login.php"]; // nsstring *strurl =[nsstring stringwithformat:@"https://mobile.epgsolutions.net/user_login.php"]; asiformdatarequest *request = [asiformdatarequest requestwithurl:[nsurl urlwithstring:strurl]]; [request setdelegate:self]; [request setpostvalue:usernametex.text forkey:@"number"]; [request setpostvalue:passwordtex.text forkey:@"password"]; [request setpostvalue:@"1" forkey:@"device_type"]; [request setpostvalue:appdelegate.devicetokenstr forkey:@"access_token"]; [request setuploadprogressdelegate:self]; [request settimeoutseconds:200000.0]; [request startasynchronous]; } else{ [[[uialertview alloc]initwithtitle:@"alert" message:@"id/password doesn't match !" delegate:self cancelbuttontitle:@"re-enter" otherbuttontitles:@"go back", nil] show]; } }
uialertview deprecated. use uialertcontroller preferredstyle of uialertcontrollerstylealert instead. ios8 apple provide new uialertcontroller class can use instead of uialertview deprecated, stated in depreciation message.
i read code, perfect , found nothing except uialertview.
may work.
Comments
Post a Comment