0
下面的代碼無法正常工作(不激活calendarDayDidChange)當日期變化:如何使用NSCalendarDayChanged - 迅速
// Define identifier
let notificationName = Notification.Name("NSNotification.Name.NSCalendarDayChanged")
// Register to receive notification
NotificationCenter.default.addObserver(self, selector: #selector(calendarDayDidChange(notification:)), name: notificationName, object: nil)
方法頭是
func calendarDayDidChange(notification : NSNotification)
沒有工作,在結果 – Aej11
沒有明顯的變化事實上,它似乎是現在的工作。感謝和抱歉的混淆 – Aej11