ViewController.swift 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //
  2. // ViewController.swift
  3. // OJASwiftKitDemo
  4. //
  5. // Created by luxiaoming on 2016/11/12.
  6. // Copyright © 2016年 luxiaoming. All rights reserved.
  7. //
  8. import UIKit
  9. import OJASwiftKit
  10. import LXMBlockKit
  11. class ViewController: OJSViewController {
  12. @IBOutlet weak var buttonOne: UIButton!
  13. class func test() {
  14. let aaa = String(describing: self.self)
  15. DLog(aaa)
  16. self.description()
  17. }
  18. override func viewDidLoad() {
  19. super.viewDidLoad()
  20. // Do any additional setup after loading the view, typically from a nib.
  21. // let color = OJSColor(r: 10, g: 10, b: 10)
  22. // let color2 = OJSColor(hexRGBValue: )
  23. let aaa = String(describing: ViewController.classForCoder())
  24. let bbb = String(describing: self.classForCoder)
  25. let ccc = String(describing: self)
  26. DLog("\n\(aaa) \n\(bbb) \n\(ccc)")
  27. buttonOne.addCallback {[unowned self] (sender: UIButton?) in
  28. // let tableViewController = OJSTableViewController()
  29. // self.navigationController?.pushViewController(tableViewController, animated: true)
  30. // let one = OneViewController()
  31. // self.navigationController?.pushViewController(one, animated: true)
  32. let three = ThreeViewController()
  33. self.navigationController?.pushViewController(three, animated: true)
  34. // let webViewController = OJSWebViewController()
  35. // self.navigationController?.pushViewController(webViewController, animated: true)
  36. }
  37. ViewController.test()
  38. UIScrollView().scrollToTop(afterDelay: 0.1, animated: true)
  39. }
  40. override func didReceiveMemoryWarning() {
  41. super.didReceiveMemoryWarning()
  42. // Dispose of any resources that can be recreated.
  43. }
  44. }
  45. extension ViewController: UITableViewDataSource {
  46. func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  47. return 0
  48. }
  49. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  50. return UITableViewCell()
  51. }
  52. }