mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-03-29 22:39:31 +08:00
26 lines
471 B
Swift
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)
|
|
}
|
|
}
|
|
|
|
}
|