Reputation: 41480
In Swift 3, what are the differences between Notification
vs NSNotification
?
Specifically, in Notification struct, there is a ReferenceType typealias of NSNotification
. How is ReferenceType being used here?
public struct Notification : ReferenceConvertible, Equatable, Hashable {
public typealias ReferenceType = NSNotification
...
}
Upvotes: 6
Views: 1435
Reputation: 63167
Notification
is a struct wrapper around NSNotification
. You can bridge between the two using as
, which is what ReferenceConvertible
does.
Upvotes: 1