86 lines
2.9 KiB
Swift
86 lines
2.9 KiB
Swift
//
|
|
// BRAboutUsViewController.swift
|
|
// BeeReel
|
|
//
|
|
// Created by 湖南秦九 on 2025/7/22.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class BRAboutUsViewController: BRViewController {
|
|
|
|
|
|
private lazy var listArr: [BRMineItem] = {
|
|
let arr = [
|
|
BRMineItem(type: .web, title: "User Agreement".localized, url: kSBUserAgreementWebUrl),
|
|
BRMineItem(type: .web, title: "Privacy Policy".localized, url: kSBPrivacyPolicyWebUrl),
|
|
BRMineItem(type: .web, title: "Child Personal Information Protection Rules".localized, url: kSBInformationProtectionWebUrl),
|
|
BRMineItem(type: .web, title: "Youth Internet Civility Convention".localized, url: kSBCivizatioConventionWebUrl),
|
|
BRMineItem(type: .web, title: "Third-party information sharing list".localized, url: kSBInformationSharingWebUrl),
|
|
BRMineItem(type: .web, title: "Explicit List of Personal Information Collection".localized, url: kSBPersoInforDisclosureWebUrl),
|
|
]
|
|
return arr
|
|
}()
|
|
|
|
private lazy var tableView: BRTableView = {
|
|
let tableView = BRTableView(frame: .zero, style: .plain)
|
|
tableView.delegate = self
|
|
tableView.dataSource = self
|
|
tableView.rowHeight = 50
|
|
tableView.separatorStyle = .none
|
|
tableView.register(BRAboutUsCell.self, forCellReuseIdentifier: "cell")
|
|
return tableView
|
|
}()
|
|
|
|
private lazy var headerView: BRAboutUsHeaderView = {
|
|
let view = BRAboutUsHeaderView(frame: .init(x: 0, y: 0, width: UIScreen.width, height: 250))
|
|
return view
|
|
}()
|
|
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
self.title = "About Us".localized
|
|
|
|
self.tableView.tableHeaderView = self.headerView
|
|
|
|
view.addSubview(self.tableView)
|
|
|
|
self.tableView.snp.makeConstraints { make in
|
|
make.edges.equalToSuperview()
|
|
}
|
|
|
|
}
|
|
|
|
|
|
override func viewWillAppear(_ animated: Bool) {
|
|
super.viewWillAppear(animated)
|
|
self.navigationController?.setNavigationBarHidden(false, animated: true)
|
|
br_setNavigation(style: .light)
|
|
}
|
|
|
|
}
|
|
|
|
|
|
extension BRAboutUsViewController: UITableViewDelegate, UITableViewDataSource {
|
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
|
return listArr.count
|
|
}
|
|
|
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
|
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! BRAboutUsCell
|
|
cell.item = listArr[indexPath.row]
|
|
return cell
|
|
}
|
|
|
|
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
|
let item = listArr[indexPath.row]
|
|
guard let webUrl = item.url else { return }
|
|
|
|
let vc = BRWebViewController()
|
|
vc.webUrl = webUrl
|
|
self.navigationController?.pushViewController(vc, animated: true)
|
|
}
|
|
|
|
|
|
}
|