Andrew Bancroft 10/8/2014

Fundamentals of NSNotificationCenter in Swift

Read Original

This article explains the fundamentals of NSNotificationCenter in Swift, focusing on its use for internal app communication rather than push notifications. It covers the basic workflow, including defining notification keys, posting and observing notifications, and provides a fully-working GitHub example for Swift 2.3 and 3.0. The author also compares NSNotificationCenter to delegation, helping developers choose the right communication pattern for their iOS apps. Updated for Xcode 8 and Swift 3.0, it serves as a practical guide for iOS developers.

Fundamentals of NSNotificationCenter in Swift

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser