以下のコードを使用alertView
すると、警告が表示されます
warning: Semantic Issue: Method '-addTextFieldWithValue:label:' not found (return type defaults to 'id')
コードは次のとおりです。
UIAlertView *alSave=[[UIAlertView alloc]initWithTitle:@"Save as" message:@"Title the note and click Save" delegate:self cancelButtonTitle:@"save" otherButtonTitles:@"cancel", nil];
NSArray *arr=[noteObj.noteTitle componentsSeparatedByString:@" - "];
app.longClickId = [noteObj.noteId integerValue];
[alSave addTextFieldWithValue:[NSString stringWithFormat:@"%@",[arr objectAtIndex:0]] label:@"Note Name"];
// show me warning at this place
textField = [alSave textFieldAtIndex:0];
textField.keyboardType = UIKeyboardTypeAlphabet;
textField.keyboardAppearance = UIKeyboardAppearanceAlert;
textField.autocorrectionType = UITextAutocorrectionTypeNo; // correction automatically
[alSave show];
if (app.NotePopOver!= nil) {
[app.NotePopOver dismissPopoverAnimated:YES];
}
[alSave release];