2017-02-09 01:41:17 +08:00
|
|
|
//
|
|
|
|
|
// AboutTableViewController.swift
|
|
|
|
|
// pass
|
|
|
|
|
//
|
|
|
|
|
// Created by Mingshen Sun on 8/2/2017.
|
|
|
|
|
// Copyright © 2017 Bob Sun. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
import UIKit
|
|
|
|
|
|
|
|
|
|
class AboutTableViewController: BasicStaticTableViewController {
|
|
|
|
|
override func viewDidLoad() {
|
|
|
|
|
tableData = [
|
|
|
|
|
// section 0
|
2020-07-05 00:25:34 +02:00
|
|
|
[
|
|
|
|
|
[.title: "Website".localize(), .action: "link", .link: "https://github.com/mssun/pass-ios.git"],
|
|
|
|
|
[.title: "Help".localize(), .action: "link", .link: "https://github.com/mssun/passforios/wiki"],
|
|
|
|
|
[.title: "ContactDeveloper".localize(), .action: "link", .link: "mailto:developer@passforios.mssun.me?subject=Pass%20for%20iOS"],
|
|
|
|
|
],
|
2018-12-09 16:59:07 -08:00
|
|
|
|
2017-02-09 01:41:17 +08:00
|
|
|
// section 1,
|
2020-07-05 00:25:34 +02:00
|
|
|
[
|
|
|
|
|
[.title: "OpenSourceComponents".localize(), .action: "segue", .link: "showOpenSourceComponentsSegue"],
|
|
|
|
|
[.title: "SpecialThanks".localize(), .action: "segue", .link: "showSpecialThanksSegue"],
|
|
|
|
|
],
|
2017-02-09 01:41:17 +08:00
|
|
|
]
|
|
|
|
|
super.viewDidLoad()
|
|
|
|
|
}
|
2018-12-09 16:59:07 -08:00
|
|
|
|
2017-02-09 01:41:17 +08:00
|
|
|
override func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
|
|
|
|
|
if section == tableData.count - 1 {
|
|
|
|
|
let view = UIView()
|
|
|
|
|
let footerLabel = UILabel(frame: CGRect(x: 8, y: 15, width: tableView.frame.width, height: 60))
|
|
|
|
|
footerLabel.numberOfLines = 0
|
2019-01-14 20:57:45 +01:00
|
|
|
footerLabel.text = "PassForIos".localize() + " \(Bundle.main.releaseVersionNumber!) (\(Bundle.main.buildVersionNumber!))"
|
2017-02-09 01:41:17 +08:00
|
|
|
footerLabel.font = UIFont.preferredFont(forTextStyle: .footnote)
|
|
|
|
|
footerLabel.textColor = UIColor.lightGray
|
|
|
|
|
footerLabel.textAlignment = .center
|
|
|
|
|
view.addSubview(footerLabel)
|
|
|
|
|
return view
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
2018-12-09 16:59:07 -08:00
|
|
|
|
2020-06-28 21:25:40 +02:00
|
|
|
override func tableView(_: UITableView, titleForHeaderInSection section: Int) -> String? {
|
2017-02-09 19:43:24 +08:00
|
|
|
if section == 1 {
|
2019-01-14 20:57:45 +01:00
|
|
|
return "Acknowledgements".localize().uppercased()
|
2017-02-09 19:43:24 +08:00
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
2017-02-09 01:41:17 +08:00
|
|
|
}
|