swift代理可以这么写
2018-01-19 本文已影响8人
风吹柳絮如花落
// MARK: 正式司导点击事件代理方法
extension HBCUserCenterViewController: HBCGuideCenterHeaderViewDelegate,HBCGuideCenterAlertViewDelegate{
func guideCenterAlertView(alertView: HBCGuideCenterAlertView, jumpWithType: Int) {
guideCenterView.forceNoticeView?.removeFromSuperview()
jump2ViewController(jumpWithType)
}
func didChooseIcon(view: HBCGuideCenterHeaderView) {
let myInformationController = MyMeterialViewController()
myInformationController.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(myInformationController, animated: true)
}
func didChooseBalance(view: HBCGuideCenterHeaderView) {
// agencyType = 0 非地接社导游
if guideCenterModel.agencyType == 0{
// pss
let withDraw = WithdrawCutomViewController()
withDraw.agencyType = 0
withDraw.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(withDraw, animated: true)
}
}
func didChooseHuangliang(view: HBCGuideCenterHeaderView) {
let huangliang = HuangliangViewController()
huangliang.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(huangliang, animated: true)
}
func didChoosePunishment(view: HBCGuideCenterHeaderView) {
let punish = PunishViewController()
punish.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(punish, animated: true)
}
func didChooseOrder(view: HBCGuideCenterHeaderView) {
let commentVC = HBCCommentListViewController()
commentVC.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(commentVC, animated: true)
}
}