2019-08-12 19:02:33 +08:00
|
|
|
//
|
|
|
|
// RootVC.swift
|
|
|
|
// Example
|
|
|
|
//
|
|
|
|
// Created by xaoxuu on 2019/8/12.
|
|
|
|
// Copyright © 2019 Titan Studio. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import UIKit
|
2020-06-24 13:33:23 +08:00
|
|
|
import ProHUD
|
2019-08-12 19:02:33 +08:00
|
|
|
|
|
|
|
class RootVC: UIViewController {
|
|
|
|
|
|
|
|
override func viewDidLoad() {
|
|
|
|
super.viewDidLoad()
|
|
|
|
|
|
|
|
// Do any additional setup after loading the view.
|
|
|
|
let vc = ViewController()
|
|
|
|
let nav = UINavigationController(rootViewController: vc)
|
|
|
|
addChild(nav)
|
|
|
|
view.addSubview(nav.view)
|
2020-06-16 16:50:53 +08:00
|
|
|
nav.view.frame = view.bounds
|
2020-06-15 18:58:13 +08:00
|
|
|
if #available(iOS 11.0, *) {
|
|
|
|
nav.navigationBar.prefersLargeTitles = true
|
|
|
|
} else {
|
|
|
|
// Fallback on earlier versions
|
|
|
|
}
|
2019-08-12 19:02:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
// MARK: - Navigation
|
|
|
|
|
|
|
|
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
|
|
|
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
|
|
|
// Get the new view controller using segue.destination.
|
|
|
|
// Pass the selected object to the new view controller.
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
}
|
2020-06-24 13:33:23 +08:00
|
|
|
|
|
|
|
extension ProHUD.Scene {
|
|
|
|
|
|
|
|
static var delete: ProHUD.Scene {
|
|
|
|
var scene = ProHUD.Scene(identifier: "prohud.delete")
|
|
|
|
scene.image = UIImage(named: "prohud.trash")
|
|
|
|
scene.title = "确认删除"
|
|
|
|
scene.message = "此操作不可撤销"
|
|
|
|
return scene
|
|
|
|
}
|
|
|
|
|
|
|
|
static var buy: ProHUD.Scene {
|
|
|
|
var scene = ProHUD.Scene(identifier: "buy")
|
|
|
|
scene.image = UIImage(named: "alert.buy")
|
|
|
|
scene.title = "确认付款"
|
|
|
|
scene.message = "一旦购买拒不退款"
|
|
|
|
return scene
|
|
|
|
}
|
|
|
|
|
|
|
|
/// 重写的loading场景
|
|
|
|
static var loading: ProHUD.Scene {
|
|
|
|
var scene = ProHUD.Scene.init(identifier: "prohud.loading.rotate")
|
|
|
|
scene.image = UIImage(named: "prohud.rainbow.circle")
|
|
|
|
scene.title = "坐和放宽"
|
|
|
|
scene.message = "正在处理一些事情"
|
|
|
|
scene.alertDuration = 0
|
|
|
|
scene.toastDuration = 0
|
|
|
|
return scene
|
|
|
|
}
|
|
|
|
|
|
|
|
static var sync: ProHUD.Scene {
|
|
|
|
var scene = ProHUD.Scene.init(identifier: "sync.rotate")
|
|
|
|
scene.image = UIImage(named: "prohud.rainbow.circle")
|
|
|
|
scene.title = "正在同步"
|
|
|
|
scene.alertDuration = 0
|
|
|
|
scene.toastDuration = 0
|
|
|
|
return scene
|
|
|
|
}
|
|
|
|
static var sync2: ProHUD.Scene {
|
|
|
|
var scene = ProHUD.Scene.init(identifier: "sync.rotate")
|
|
|
|
scene.image = UIImage(named: "prohud.rainbow.circle")
|
|
|
|
scene.alertDuration = 0
|
|
|
|
scene.toastDuration = 0
|
|
|
|
return scene
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|