/// 配置导航 客服
    private func setNavRightBar() {
        let rightBarItem = UIBarButtonItem(image: UIImage(named: "customerService")?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal), style: .plain, target: self, action: #selector(clickCustomerServiceItem))
        self.navigationItem.rightBarButtonItem = rightBarItem
    }

 

 

 

2.自定义view的item

private let rightItemView = JYSelectDateRightItemView()

        self.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: self.rightItemView)

 

 

 

posted on 2020-03-16 10:35  懂事长qingzZ  阅读(307)  评论(0编辑  收藏  举报