Skip to content

Commit

Permalink
added unavailable attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sgr-ksmt committed Jun 24, 2017
1 parent 4b9ccff commit d98aa28
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Sources/ActionSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ extension Alertift {
}

/// Add action to alertController
@available(*, unavailable, message: "")
public func action(_ action: Alertift.Action, handler: @escaping Alertift.ActionHandler = {}) -> Self {
_alertController.addAction(buildAlertAction(action, handler: handler))
return self
Expand Down
2 changes: 2 additions & 0 deletions Sources/Alert.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ extension Alertift {
/// - isPreferred: If you want to change this action to preferredAction, set true. Default is false.
/// - handler: The block to execute after this action performed.
/// - Returns: Myself
@available(*, unavailable, message: "")
public func action(_ action: Alertift.Action, isPreferred: Bool = false, handler: @escaping Alertift.ActionHandler = {}) -> Self {
addActionToAlertController(buildAlertAction(action, handler: handler), isPreferred: isPreferred)
return self
Expand All @@ -68,6 +69,7 @@ extension Alertift {
/// - isPreferred: If you want to change this action to preferredAction, set true. Default is false.
/// - textFieldsHandler: The block that returns array of UITextFields to execute after this action performed.
/// - Returns: Myself
@available(*, unavailable, message: "")
final public func action(_ action: Alertift.Action, isPreferred: Bool = false, textFieldsHandler handler: @escaping ActionWithTextFieldsHandler) -> Self {
addActionToAlertController(
buildAlertAction(action, handler: merge(_alertController.actionWithTextFieldsHandler, handler)),
Expand Down
1 change: 1 addition & 0 deletions Sources/AlertType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ extension AlertType {
/// - action: action
/// - handler: The handler to execute after the action selected.
/// - Returns: **UIAlertAction**
@available(*, unavailable, message: "")
func buildAlertAction(_ action: Alertift.Action, handler: @escaping Alertift.ActionHandler) -> UIAlertAction {
return action.buildAlertAction(handler: ActionHandlerBuilder.build(handler, _alertController.finallyExecutor))
}
Expand Down

0 comments on commit d98aa28

Please sign in to comment.