me montrer quand j'utilise alertView
en utilisant le code ci-dessous, il me montre l'avertissementVoir avertissement
warning: Semantic Issue: Method '-addTextFieldWithValue:label:' not found (return type defaults to 'id')
Voici le code:
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];
double possible de [avertissement: « UIAlertView » ne peut pas répondre à « -addTextFieldWithValue: label: »] (http://stackoverflow.com/questions/2294910/warning-uialertview-may-not-respond-to-addtextfieldwithvaluelabel) – PengOne
et '-textFieldAtIndex:' non trouvé (le type de retour par défaut est 'id') –
Encore une fois, vous êtes en utilisant des méthodes non documentées ou inexistantes. Vérifiez la documentation. Si la méthode n'est pas là, un avertissement s'ensuivra et Apple rejettera probablement l'application. – PengOne