mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 08:39:20 +00:00
50 lines
1.7 KiB
Objective-C
Executable file
50 lines
1.7 KiB
Objective-C
Executable file
//
|
|
// DTActionSheet.h
|
|
// DTFoundation
|
|
//
|
|
// Created by Oliver Drobnik on 08.06.12.
|
|
// Copyright (c) 2012 Cocoanetics. All rights reserved.
|
|
//
|
|
|
|
typedef void (^DTActionSheetBlock)(void);
|
|
|
|
/**
|
|
Extends UIActionSheet with support for blocks
|
|
*/
|
|
|
|
@interface DTActionSheet : UIActionSheet
|
|
|
|
/**
|
|
Initializes the action sheet using the specified title.
|
|
*/
|
|
- (id)initWithTitle:(NSString *)title;
|
|
|
|
/**
|
|
Adds a custom button to the action sheet.
|
|
@param title The title of the new button.
|
|
@param block The block to execute when the button is tapped.
|
|
@returns The index of the new button. Button indices start at 0 and increase in the order they are added.
|
|
*/
|
|
- (NSInteger)addButtonWithTitle:(NSString *)title block:(DTActionSheetBlock)block;
|
|
|
|
/**
|
|
Adds a custom destructive button to the action sheet.
|
|
|
|
Since there can only be one destructive button a previously marked destructive button becomes a normal button.
|
|
@param title The title of the new button.
|
|
@param block The block to execute when the button is tapped.
|
|
@returns The index of the new button. Button indices start at 0 and increase in the order they are added.
|
|
*/
|
|
- (NSInteger)addDestructiveButtonWithTitle:(NSString *)title block:(DTActionSheetBlock)block;
|
|
|
|
/**
|
|
Adds a custom cancel button to the action sheet.
|
|
|
|
Since there can only be one cancel button a previously marked cancel button becomes a normal button.
|
|
@param title The title of the new button.
|
|
@param block The block to execute when the button is tapped.
|
|
@returns The index of the new button. Button indices start at 0 and increase in the order they are added.
|
|
*/
|
|
- (NSInteger)addCancelButtonWithTitle:(NSString *)title block:(DTActionSheetBlock)block;
|
|
|
|
@end
|