Can I pass nil for the object argument of -[NSNotificationCenter postNotificationName:object:]
since the observers don't care who the sender is, or is it better practice to pass self
for the object argument even though the observers aren't checking who sent the notification?
Passing nil won't harm anything. It's just nice to be able to know what sent the notification, even if current observers don't need to know and don't check it.
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