同步操作将从 兰德网络O2OA平台软件/O2OA 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
//// OOTableViewController.swift// O2Platform//// Created by 刘振兴 on 2018年4月8日.// Copyright © 2018年 zoneland. All rights reserved.//import UIKitpublic protocol Configurable {func config(withItem item: Any?)}open class OOTableViewController<T,Cell:UITableViewCell>:UITableViewController where Cell:Configurable {private let cellIdentifier = String(describing: Cell.self)var data = [T]() {didSet {tableView.reloadData()if tableView.numberOfRows(inSection: 0) > 0 {tableView.scrollToRow(at: IndexPath.init(row: 0, section: 0) , at: .top, animated: true)}}}init() {super.init(nibName:nil,bundle:nil)}required public init?(coder aDecoder: NSCoder) {fatalError("init(coder:) has not been implemented")}open override func viewWillAppear(_ animated: Bool) {super.viewWillAppear(true)navigationController?.navigationBar.isTranslucent = false}override open func viewDidLoad() {super.viewDidLoad()tableView.register(Cell.self, forCellReuseIdentifier: cellIdentifier)tableView.rowHeight = UITableView.automaticDimensiontableView.estimatedRowHeight = 60}override open func tableView(_ tableView:UITableView,numberOfRowsInSection section:Int) -> Int {return data.count}override open func tableView(_ tableView:UITableView,cellForRowAt indexPath:IndexPath) -> UITableViewCell {let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) as! Cellcell.config(withItem: data[indexPath.row])return cell}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。