NotificationCenter threads and observers
If you call NotificationCenter.default.post on a background thread, which thread does the observer code run on?
If you call NotificationCenter.default.post on a background thread, which thread does the observer code run on?
Notification delivery is synchronous and the observer runs on the thread that called post (no queue hop). To receive on main, pass queue: .main when you register or hop to the MainActor.
ArchitectureMultiple choiceBasics
Which of these statements about Foundation's NotificationCenter are correct? Select all…
#notificationcenter #observer
App lifecycle and systemShort answerBasics
From the moment the app icon is tapped on the home screen until the first screen is…
#objective-c
App lifecycle and systemShort answerIntro
In a UIKit screen, which pair of lifecycle methods would you add and remove a…
#observer
ArchitectureMultiple choiceAdvanced
In this Coordinator implementation, LoginCoordinator stays in memory after the login flow…
#memory