TKActions

Objective-C

@interface TKActions : NSObject

/*
 @default YES
 */
@property (nonatomic, assign) BOOL hasCancel;

/*
 @default UIAlertControllerStyleActionSheet
 */
@property (nonatomic, assign) UIAlertControllerStyle type;

/*
 The message shown on alert sheets.
 */
@property (nonatomic, copy) NSString *message;

- (instancetype)initWithTitle:(nullable NSString *)title;

- (void)addAction:(NSString *)title handler:(nullable TKActionBlock)handler;

- (void)setTextFieldWithValue:(NSString *)value
                      handler:(TKActionTextfieldBlock)handler;

- (void)showForSender:(nullable id)sender
         inController:(UIViewController *)controller;

@end

Swift

class TKActions : NSObject

Undocumented

  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) BOOL hasCancel

    Swift

    var hasCancel: Bool { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) UIAlertControllerStyle type

    Swift

    var type: UIAlertController.Style { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *message

    Swift

    var message: String { get set }
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithTitle:(nullable NSString *)title;

    Swift

    init(title: String?)
  • Undocumented

    Declaration

    Objective-C

    - (void)addAction:(NSString *)title handler:(nullable TKActionBlock)handler;

    Swift

    func addAction(_ title: String, handler: TKActionBlock? = nil)
  • Undocumented

    Declaration

    Objective-C

    - (void)setTextFieldWithValue:(NSString *)value
                          handler:(TKActionTextfieldBlock)handler;

    Swift

    func setTextFieldWithValue(_ value: String, handler: @escaping TKActionTextfieldBlock)
  • Undocumented

    Declaration

    Objective-C

    - (void)showForSender:(nullable id)sender
             inController:(UIViewController *)controller;

    Swift

    func showForSender(_ sender: Any?, in controller: UIViewController)