輸入文本框設置

今天就給你們分享個簡單的輸入文本框吧!!!歡迎你們給意見,後續精彩繼續更新中。it

 

UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"標題" message:nilio

 preferredStyle:UIAlertControllerStyleAlert];im

    _progressText.placeholder = @"佔位符";分享

    

    [alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) {animate

        textField.placeholder = _progressText.placeholder;handler

        textField.keyboardType = UIKeyboardTypeDefault;co

        _progressText = textField;let

    }];return

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

        return ;

    }];

    

    UIAlertAction *otherAction = [UIAlertAction actionWithTitle:@"肯定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {

        //要作的事情

    }];

       [alertController addAction:cancelAction];

    [alertController addAction:otherAction];

    [self presentViewController:alertController animated:YES completion:nil];

相關文章
相關標籤/搜索