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)
这样我们就可以通过命名空间将系统通知和我们的业务通知区分开来。