第36月第29天 swift知识集合

1.

print(String.init(format"%s"object_getClassName(p)))

 

https://www.cnblogs.com/doudouyoutang/p/9760603.html

 

2.

 

extension NotificationCenter: ZYCompatible{}
extension ZY where Base: NotificationCenter {
func post(name aName: NSNotification.Name, object anObject: Any?, userInfo aUserInfo: [AnyHashable : Any]? = nil)
}

NotificationCenter.default.zy.post(name: NSNotification.Name("userLogin"), object: nil)

这样我们就可以通过命名空间将系统通知和我们的业务通知区分开来。

 

https://www.jianshu.com/p/1a106019785d

posted @ 2019-09-29 17:36  lianhuaren  阅读(102)  评论(0编辑  收藏  举报