Files
GitHawk/Classes/Utility/UIAlertController+Action.swift
Hesham Salman f213bac924 Thin SwiftLint ruleset (#704)
* Thin SwiftLint ruleset

* Disabled trailing_whitespace rule
2017-10-23 16:58:09 -04:00

26 lines
471 B
Swift

//
// UIAlertController+AddAction.swift
// Freetime
//
// Created by Ivan Magda on 26/09/2017.
// Copyright © 2017 Ryan Nystrom. All rights reserved.
//
import UIKit
extension UIAlertController {
func addActions(_ actions: [UIAlertAction?]) {
for anAction in actions {
self.add(action: anAction)
}
}
func add(action: UIAlertAction?) {
if let action = action {
self.addAction(action)
}
}
}