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
...
}
Notification is a struct wrapper around NSNotification. You can bridge between the two using as, which is what ReferenceConvertible does.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With