在Swift 3中,Notificationvs 之间有什么区别NSNotification?
具体来说,在Notification struct中,有一个ReferenceType类型NSNotification.ReferenceType是如何在这里使用的?
public struct Notification : ReferenceConvertible, Equatable, Hashable {
public typealias ReferenceType = NSNotification
...
}
Run Code Online (Sandbox Code Playgroud)
Notification是一个结构包装器NSNotification。您可以使用 来在两者之间建立桥梁as,这就是它的ReferenceConvertible作用。
| 归档时间: |
|
| 查看次数: |
762 次 |
| 最近记录: |