Possible Duplicate:
warning: 'UIAlertView' may not respond to '-addTextFieldWithValue:label:'
I am using below code for put textfield in AlertView, it gives a warning like “UIAlertView may not respond – addTextFieldWithValue: label:” & “UIAlertView may not respond – textFieldAtIndex”…
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Email" message:@""
delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Submit", nil];
[alert addTextFieldWithValue:@"" label:@"Email"];
// Username
textfieldName = [alert textFieldAtIndex:0];
textfieldName.keyboardType = UIKeyboardTypeEmailAddress;
textfieldName.keyboardAppearance = UIKeyboardAppearanceAlert;
textfieldName.autocorrectionType = UITextAutocorrectionTypeNo;
[alert show];
please help!
there is no method “addTextFieldWithValue” for uialertview
if you need to modify your alert view have a look at my blog here – http://www.makebetterthings.com/blogs/iphone/add-uitextfield-in-uialertview/