可能重複:
warning: 'UIAlertView' may not respond to '-addTextFieldWithValue:label:'警告上Alertview
我使用下面的AlertView放文本框代碼,它給像「UIAlertView中可能沒有響應的警告 - addTextFieldWithValue:標籤: 「&」UIAlertView可能不會響應 - 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];
請幫忙!
什麼是你想用這樣說? – Saurabh 2011-05-19 08:11:33