2019-07-31 17:40:39 +08:00
|
|
|
//
|
|
|
|
// ViewController.swift
|
|
|
|
// Example
|
|
|
|
//
|
|
|
|
// Created by xaoxuu on 2018/6/15.
|
|
|
|
// Copyright © 2018 Titan Studio. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import UIKit
|
2020-06-15 15:11:44 +08:00
|
|
|
//import ProHUD
|
2019-08-12 17:59:40 +08:00
|
|
|
import SnapKit
|
2019-07-31 17:40:39 +08:00
|
|
|
|
2019-08-12 17:59:40 +08:00
|
|
|
class ViewController: BaseListVC {
|
|
|
|
|
2019-07-31 17:40:39 +08:00
|
|
|
override func viewDidLoad() {
|
|
|
|
super.viewDidLoad()
|
|
|
|
// Do any additional setup after loading the view.
|
2020-06-19 10:48:47 +08:00
|
|
|
title = "\(Bundle.main.infoDictionary?["CFBundleName"] ?? "ProHUD")"
|
2019-07-31 17:40:39 +08:00
|
|
|
}
|
2019-08-05 14:20:52 +08:00
|
|
|
|
2019-08-12 17:59:40 +08:00
|
|
|
override var titles: [String] {
|
|
|
|
return ["Toast", "Alert", "Guard"]
|
|
|
|
}
|
2019-08-05 14:20:52 +08:00
|
|
|
|
2019-08-12 17:59:40 +08:00
|
|
|
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
2019-08-12 19:02:33 +08:00
|
|
|
tableView.deselectRow(at: indexPath, animated: true)
|
2019-08-12 17:59:40 +08:00
|
|
|
if indexPath.row == 0 {
|
2019-08-12 20:20:07 +08:00
|
|
|
let vc = TestToastVC()
|
|
|
|
vc.title = titles[indexPath.row]
|
|
|
|
navigationController?.pushViewController(vc, animated: true)
|
2019-08-12 17:59:40 +08:00
|
|
|
} else if indexPath.row == 1 {
|
2019-08-12 20:20:07 +08:00
|
|
|
let vc = TestAlertVC()
|
|
|
|
vc.title = titles[indexPath.row]
|
|
|
|
navigationController?.pushViewController(vc, animated: true)
|
2019-08-12 17:59:40 +08:00
|
|
|
} else {
|
2019-08-12 20:20:07 +08:00
|
|
|
let vc = TestGuardVC()
|
|
|
|
vc.title = titles[indexPath.row]
|
|
|
|
navigationController?.pushViewController(vc, animated: true)
|
2019-08-12 17:59:40 +08:00
|
|
|
}
|
2019-08-05 14:20:52 +08:00
|
|
|
}
|
|
|
|
|
2019-07-31 17:40:39 +08:00
|
|
|
}
|
|
|
|
|