Commit 6f7ca71f authored by 刘俊宏's avatar 刘俊宏

完善工作中心

parent ee0bfbc8
......@@ -31,6 +31,10 @@ class OrderListViewController: BaseViewController ,UISearchBarDelegate, SearchBa
var searchV : SearchBarView? = nil
@IBOutlet weak var contentView: UIView!
@IBOutlet weak var searchBgView: UIView!
//头部滚动视图
weak var pagingVC : PagingViewController?
override func viewDidLoad() {
super.viewDidLoad()
......@@ -49,7 +53,6 @@ class OrderListViewController: BaseViewController ,UISearchBarDelegate, SearchBa
searchBr.delegate = self
searchBr.delegateL = self
//头部滚动视图
let pagingViewController = PagingViewController(viewControllers: viewControllers)
pagingViewController.indicatorColor = UIColor.init(named: "蓝色字体颜色")!
pagingViewController.menuItemSize = .fixed(width: 0, height: 44*glscale)
......@@ -64,12 +67,20 @@ class OrderListViewController: BaseViewController ,UISearchBarDelegate, SearchBa
contentView.addSubview(pagingViewController.view)
contentView.constrainToEdges(pagingViewController.view)
pagingViewController.didMove(toParent: self)
pagingVC = pagingViewController
//MARK:--添加个刷新通知
NotificationCenter.default.addObserver(self, selector: #selector(refreshingByOrderHavChange), name: NSNotification.Name(rawValue: "orderChange"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(jpushServiceNotification(notion:)), name: NSNotification.Name(rawValue: "jpushServiceNotification0"), object: nil)
//跳转对应的头部视图
NotificationCenter.default.addObserver(self, selector: #selector(orderNavChange), name: NSNotification.Name(rawValue: "orderNavChange"), object: nil)
}
@objc func orderNavChange(notion:Notification){
let dic = notion.userInfo
pagingVC!.select(index: dic!["tag"] as Any as! Int, animated: true)
}
//MARK:--jpushServiceNotification
@objc func jpushServiceNotification(notion:Notification) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment