-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add section on NSNotification names #20
Comments
@jacobvanorder currently, we store them all like this:
. . .
Any thoughts / suggestions from the group on how we might? |
Notification names are constants so should follow the As for where to store them.. I prefer exporting the notification name in the header of the related functionality. That way they're available wherever you need them but you don't get every token available in every file. e.g.
|
I was just curious as if the NYT team uses certain prefixes or has any special rules but if they follow in a way to discern in other places in the code that this is a notification constant or not. It seems that a suffix is used in each one to give that indication. Again, I was just curious. I tend to side with @chrismaddern on the fact that they should be kept with the related files in that if a particular feature and corresponding files are removed, so goes the cruft of all of the notification constants. I can see the side, though, of having all your constants in one place so you know where to add/remove them when need be or if two features share a notification, there's a neutral place for it. |
Perhaps how NYTimes team handles NSNotification names.
The text was updated successfully, but these errors were encountered: