1

これ:

UIAlertController *alert = [UIAlertController alertControllerWithTitle:title
                                                                   message:message    preferredStyle:UIAlertControllerStyleAlert];

    [alert addTextFieldWithConfigurationHandler:^(UITextField *tf) {
        tf.placeholder = @"email address";
    }];

UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel"
                                                               style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {

                                                               }];
        UIAlertAction *upgradeAction = [UIAlertAction actionWithTitle:@"Upgrade"
                                                               style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {

                                                               }];
        [alert addAction:cancelAction];
        [alert addAction:upgradeAction];
        [self presentViewController:alert animated:YES completion:nil];

生成中: *キャッチされない例外 'NSInternalInconsistencyException' が原因でアプリを終了しています。

ただし、テキスト フィールドを構成するコード行を削除すると、正しく機能します。

これをどのように修正できるかについて何か考えはありますか?前もって感謝します。

4

0 に答える 0