Selon iOS Using and Creating Error Objects, on peut afficher un objet d'erreur avec le code suivant.Où est NSAlert.h dans le SDK iOS?
NSError *theError = nil;
BOOL success = [myDoc writeToURL:[self docURL] ofType:@"html" error:&theError];
if (success == NO) {
// Maybe try to determine cause of error and recover first.
NSAlert *theAlert = [NSAlert alertWithError:theError];
[theAlert runModal]; // Ignore return value.
}
Malheureusement, je ne suis pas assez intelligent pour comprendre comment inclure NSAlert.h
.
Toute aide serait appréciée.
FYI: depuis iOS 8 UIAlertController remplace UIAlertView et UIActionSheet. –