Fix some "linking against dylib" warning
- Move requestGitPassword to view controllers - Move Utils.alert out of passKit, because SVProgressHUD is there
This commit is contained in:
parent
86a6fb6395
commit
7f6900b7cd
7 changed files with 112 additions and 65 deletions
20
pass/Helpers/UtilsExtension.swift
Normal file
20
pass/Helpers/UtilsExtension.swift
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
//
|
||||
// UtilsExtension.swift
|
||||
// pass
|
||||
//
|
||||
// Created by Yishi Lin on 13/6/17.
|
||||
// Copyright © 2017年 Bob Sun. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SVProgressHUD
|
||||
import passKit
|
||||
|
||||
extension Utils {
|
||||
static func alert(title: String, message: String, controller: UIViewController, handler: ((UIAlertAction) -> Void)? = nil, completion: (() -> Void)? = nil) {
|
||||
SVProgressHUD.dismiss()
|
||||
let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert)
|
||||
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: handler))
|
||||
controller.present(alert, animated: true, completion: completion)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue