NSBlog
"A failure in the hot air department"
Showing entries tagged "notifications". Full blog index.
Friday Q&A 2015-01-23: Let's Build Swift Notifications
at 2015-01-23 14:52
NSNotificationCenter
is a useful API that's pervasive in Apple's frameworks, and often sees a lot of use within our own code. I previously explored building NSNotificationCenter
in Objective-C. Today, I want to build it in Swift, but not just another reimplementation of the same idea. Instead, I'm going to take the API and make it faster, better, stronger, and take advantage of all the nice stuff Swift has to offer us.Friday Q&A 2011-07-08: Let's Build NSNotificationCenter
at 2011-07-08 16:11
Notifications in Cocoa are extremely useful and are pervasive in Cocoa programming. Unfortunately, a lot of Cocoa programmers see the notification system as something of a black box: a notification is posted, Stuff Happens, and somehow the observer gets notified. Fortunately, the Stuff that Happens is actually pretty simple, and to explore it, I'm going to reimplement an
NSNotificationCenter
workalike from scratch to illustrate how it all works, a topic suggested by Dylan Copeland.Friday Q&A 2010-01-08: NSNotificationQueue
at 2010-01-08 07:21
It's that time of the week again. No, it's not just time to go get drunk, but time for Friday Q&A! This week's topic, suggested by Christopher Lloyd of Cocotron (a really neat open source project that lets you write Objective-C/Cocoa code for non-Mac platforms like Windows), is
NSNotificationQueue
, a little-known, poorly-understood, but handy Foundation class.