iOS applications developer working on various kinds of projects. Recently discovering an incentive to share his knowledge with other fellows.
When you would like to create constant in Swift there are many ways to do that. Which one is the best depends on your taste. The most important thing about the constant is the fact the you cannot change its value.
If you are working with closure based NSNotification’s implementation, you have to deal with returned `tokens`. The simplest way to store reference to them is to keep them in a property:
Long, long time ago (a couple of years ;)) I was reading a book called Design Patterns: Elements of Reusable Object-Oriented Software. I was a young software developer…