iphone 4 UIAlertView setAlertViewStyle unrecognized selector sent to instance -
iphone 4 UIAlertView setAlertViewStyle unrecognized selector sent to instance -
i used below code add together textfield in uialertview. works fine in simulator(ios sdk 5.0) when install in device(ios 4.0.1) "unrecognized selector sent instance error"
uialertview *alert = [[uialertview alloc] initwithtitle:@"enter name" message:nil delegate:self cancelbuttontitle:@"cancel" otherbuttontitles:@"ok", nil]; alert.alertviewstyle = uialertviewstyleplaintextinput; alert.tag = 9001; [alert show]; [alert release];
uialertview *myalert = [[uialertview alloc] initwithtitle:@"my test alert" message:@"what want" delegate:nil cancelbuttontitle:@"tell me" otherbuttontitles:@"cancel", nil]; [myalert addtextfieldwithvalue:@"nothing" label:@"say something"]; uitextfield * atextfld = [myalert textfieldatindex: 0]; atextfld.clearbuttonmode = uitextfieldviewmodewhileediting; atextfld.autocorrectiontype = uitextautocorrectiontypeno; [myalert show]; [myalert release];
uialertview iphone-4
Comments
Post a Comment