ich eine Warnung erstellt haben, wie folgt:UIAlertView und UIAlertController Titel nicht angezeigt
// UIAlertView
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"WARNING" message:@"Are you sure you want to quit ?" delegate:nil cancelButtonTitle:@"Confirm" otherButtonTitles:@"Cancel", nil];
[alertView show];
// or UIAlertController
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"WARNING" message:@"Are you sure you want to quit ?" preferredStyle:UIAlertControllerStyleAlert];
[alertController addAction:[UIAlertAction actionWithTitle:@"Confirm" style:UIAlertActionStyleDefault handler:NULL]];
[alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:NULL]];
[self presentViewController:alertController animated:YES completion:NULL];
Aber sowohl die Effekte sind wie folgt aus:
Ich versuche, den Titel Benachrichtigung anmelden, aber das Ergebnis ist null:
Wie kann ich das beheben?
Bevor Sie, wenn für 'UIAlertView' zu beheben versuchen: Verwenden Sie es nicht. Es ist in iOS 8 veraltet. – FelixSFD
Verwenden Sie SetTitle irgendwo in Ihrem Code? – vishnuvarthan
goto Produkt -> sauber und versuchen Sie es erneut – KSR