+ (instancetype)actionWithTitle:(NSString *)title style:(UIAlertActionStyle)style handler:(void (^)(UIAlertAction *action))handler;
@property (nonatomic, readonly) NSString *title;
@property (nonatomic, readonly) UIAlertActionStyle style;
@property (nonatomic, getter=isEnabled) BOOL enabled;
@end
NS_CLASS_AVAILABLE_IOS(8_0) @interface UIAlertController : UIViewController
[Format Time: 0.0029 seconds]
创建提示框
Crayon Syntax Highlighter v2.7.1
+ (instancetype)alertControllerWithTitle:(NSString *)title message:(NSString *)message preferredStyle:(UIAlertControllerStyle)preferredStyle;
1
+ (instancetype)alertControllerWithTitle:(NSString *)title message:(NSString *)message preferredStyle:(UIAlertControllerStyle)preferredStyle;
[Format Time: 0.0010 seconds]
添加按钮
Crayon Syntax Highlighter v2.7.1
- (void)addAction:(UIAlertAction *)action;
@property (nonatomic, readonly) NSArray *actions;
1
2
3
- (void)addAction:(UIAlertAction *)action;
@property (nonatomic, readonly) NSArray *actions;
[Format Time: 0.0008 seconds]
添加文本输入框
Crayon Syntax Highlighter v2.7.1
- (void)addTextFieldWithConfigurationHandler:(void (^)(UITextField *textField))configurationHandler;
@property (nonatomic, readonly) NSArray *textFields;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *message;
@property (nonatomic, readonly) UIAlertControllerStyle preferredStyle;
1
2
3
4
5
6
7
8
9
- (void)addTextFieldWithConfigurationHandler:(void (^)(UITextField *textField))configurationHandler;