NotificationCenter registered selector is not called
问题 I currently have this code below to see if the day has elapsed, but it doesn't seem to be working. Have I coded this correctly? NotificationCenter.default.addObserver(self, selector:"calendarDayDidChange:", name:NSNotification.Name.NSCalendarDayChanged, object:nil) func calendarDayDidChange(notification : NSNotification) { // code to respond to notification } 回答1: I think the way you registered observer is not correct. Please try the below and check. NotificationCenter.default.addObserver