#if (defined(USE_UIKIT_PUBLIC_HEADERS) && USE_UIKIT_PUBLIC_HEADERS) || !__has_include() // // UIAlertController.h // UIKit // // Copyright (c) 2014-2018 Apple Inc. All rights reserved. // #import #import #import NS_HEADER_AUDIT_BEGIN(nullability, sendability) typedef NS_ENUM(NSInteger, UIAlertActionStyle) { UIAlertActionStyleDefault = 0, UIAlertActionStyleCancel, UIAlertActionStyleDestructive } API_AVAILABLE(ios(8.0)); typedef NS_ENUM(NSInteger, UIAlertControllerStyle) { UIAlertControllerStyleActionSheet = 0, UIAlertControllerStyleAlert } API_AVAILABLE(ios(8.0)); typedef NS_ENUM(NSInteger, UIAlertControllerSeverity) { UIAlertControllerSeverityDefault = 0, UIAlertControllerSeverityCritical } API_AVAILABLE(ios(16.0)); UIKIT_EXTERN API_AVAILABLE(ios(8.0)) NS_SWIFT_UI_ACTOR @interface UIAlertAction : NSObject + (instancetype)actionWithTitle:(nullable NSString *)title style:(UIAlertActionStyle)style handler:(void (^ __nullable)(UIAlertAction *action))handler; @property (nullable, nonatomic, readonly) NSString *title; @property (nonatomic, readonly) UIAlertActionStyle style; @property (nonatomic, getter=isEnabled) BOOL enabled; @end UIKIT_EXTERN API_AVAILABLE(ios(8.0)) NS_SWIFT_UI_ACTOR @interface UIAlertController : UIViewController + (instancetype)alertControllerWithTitle:(nullable NSString *)title message:(nullable NSString *)message preferredStyle:(UIAlertControllerStyle)preferredStyle; - (void)addAction:(UIAlertAction *)action; @property (nonatomic, readonly) NSArray *actions; @property (nonatomic, strong, nullable) UIAlertAction *preferredAction API_AVAILABLE(ios(9.0)); - (void)addTextFieldWithConfigurationHandler:(void (^ __nullable)(UITextField *textField))configurationHandler; @property (nullable, nonatomic, readonly) NSArray *textFields; @property (nullable, nonatomic, copy) NSString *title; @property (nullable, nonatomic, copy) NSString *message; @property (nonatomic, readonly) UIAlertControllerStyle preferredStyle; @property (nonatomic) UIAlertControllerSeverity severity API_AVAILABLE(ios(16.0)); @end #if TARGET_OS_IOS @interface UIAlertController (SpringLoading) @end #endif NS_HEADER_AUDIT_END(nullability, sendability) #else #import #endif