// khoi tao
NotificationCenter.default.addObserver(self, selector: #selector( self.gotoSelectCate( not: ) ), name: NSNotification.Name(rawValue: "gotoSelectCate"), object: nil)
func gotoSelectCate( not: NSNotification ){
if let userInfo = not.userInfo {
if let userName = userInfo["name"] as? String {
print(userName)
scrollToCateSelected(md: arrList[Int(userName)!] as! ModelCate)
}
}
self.slideMenuController()?.closeLeft()
}
// class khac
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "gotoSelectCate"), object: self , userInfo: ["name": mdGet.m_type ] )
Không có nhận xét nào:
Đăng nhận xét