ViewController.swift 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // ViewController.swift
  3. // BFFramework
  4. //
  5. // Created by 287971051@qq.com on 05/28/2021.
  6. // Copyright (c) 2021 287971051@qq.com. All rights reserved.
  7. //
  8. import BFFramework
  9. import BFCommonKit
  10. import UIKit
  11. class ViewController: UIViewController {
  12. override func viewDidLoad() {
  13. super.viewDidLoad()
  14. view.backgroundColor = .white
  15. navigationItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", style: UIBarButtonItem.Style.plain, target: self, action: Selector(("next:")))
  16. let btn = UIButton(type: .contactAdd)
  17. btn.frame = CGRect(x: 100, y: 100, width: 100, height: 100)
  18. view.addSubview(btn)
  19. btn.addTarget(self, action: #selector(btnClicked), for: .touchUpInside)
  20. }
  21. func next(sender _: AnyObject) {
  22. print("next is onclick")
  23. BFLog(message: "ssssss")
  24. }
  25. @objc func btnClicked() -> String {
  26. print("打开界面")
  27. BFLog(message: "ssssss")
  28. // PQBFConfig.shared.styleColor = .green
  29. // navigationController?.pushViewController(PQStuckPointMaterialController(), animated: true)
  30. let nav = UINavigationController(rootViewController: PQStuckPointMaterialController())
  31. nav.modalPresentationStyle = .overFullScreen
  32. present(nav, animated: true, completion: nil)
  33. return "111"
  34. }
  35. }