Documentation Archive Developer
Search

NotificationCenter Changes for Swift

NotificationCenter

Declaration
From
enum NCUpdateResult : UInt {
    case NewData
    case NoData
    case Failed
}
To
enum NCUpdateResult : UInt {
    case newData
    case noData
    case failed
}

Declaration
From
case Failed
To
case failed

Declaration
From
case NewData
To
case newData

Declaration
From
case NoData
To
case noData

DeclarationProtocols
From
class NCWidgetController : NSObject {
    class func widgetController() -> Self
    func setHasContent(_ flag: Bool, forWidgetWithBundleIdentifier bundleID: String)
}
--
To
class NCWidgetController : NSObject {
    class func widgetController() -> Self
    func setHasContent(_ flag: Bool, forWidgetWithBundleIdentifier bundleID: String)
    func awakeFromNib()
    func prepareForInterfaceBuilder()
    func accessibilityActivate() -> Bool
    func accessibilityIncrement()
    func accessibilityDecrement()
    func accessibilityScroll(_ direction: UIAccessibilityScrollDirection) -> Bool
    func accessibilityPerformEscape() -> Bool
    func accessibilityPerformMagicTap() -> Bool
    var accessibilityCustomActions: [UIAccessibilityCustomAction]?
    func accessibilityElementDidBecomeFocused()
    func accessibilityElementDidLoseFocus()
    func accessibilityElementIsFocused() -> Bool
    func accessibilityAssistiveTechnologyFocusedIdentifiers() -> Set<String>?
    func accessibilityElementCount() -> Int
    func accessibilityElement(at index: Int) -> Any?
    func index(ofAccessibilityElement element: Any) -> Int
    var accessibilityElements: [Any]?
    var isAccessibilityElement: Bool
    var accessibilityLabel: String?
    var accessibilityHint: String?
    var accessibilityValue: String?
    var accessibilityTraits: UIAccessibilityTraits
    var accessibilityFrame: CGRect
    @NSCopying var accessibilityPath: UIBezierPath?
    var accessibilityActivationPoint: CGPoint
    var accessibilityLanguage: String?
    var accessibilityElementsHidden: Bool
    var accessibilityViewIsModal: Bool
    var shouldGroupAccessibilityChildren: Bool
    var accessibilityNavigationStyle: UIAccessibilityNavigationStyle
    var accessibilityHeaderElements: [Any]?
    var accessibilityCustomRotors: [UIAccessibilityCustomRotor]?
    func performSelector(onMainThread aSelector: Selector, with arg: Any?, waitUntilDone wait: Bool, modes array: [String]?)
    func performSelector(onMainThread aSelector: Selector, with arg: Any?, waitUntilDone wait: Bool)
    func perform(_ aSelector: Selector, on thr: Thread, with arg: Any?, waitUntilDone wait: Bool, modes array: [String]?)
    func perform(_ aSelector: Selector, on thr: Thread, with arg: Any?, waitUntilDone wait: Bool)
    func performSelector(inBackground aSelector: Selector, with arg: Any?)
    class func classForKeyedUnarchiver() -> AnyClass
    var classForKeyedArchiver: AnyClass? { get }
    func replacementObject(for archiver: NSKeyedArchiver) -> Any?
    class func classFallbacksForKeyedArchiver() -> [String]
    class func keyPathsForValuesAffectingValue(forKey key: String) -> Set<String>
    class func automaticallyNotifiesObservers(forKey key: String) -> Bool
    var observationInfo: UnsafeMutableRawPointer?
    func willChangeValue(forKey key: String)
    func didChangeValue(forKey key: String)
    func willChange(_ changeKind: NSKeyValueChange, valuesAt indexes: IndexSet, forKey key: String)
    func didChange(_ changeKind: NSKeyValueChange, valuesAt indexes: IndexSet, forKey key: String)
    func willChangeValue(forKey key: String, withSetMutation mutationKind: NSKeyValueSetMutationKind, using objects: Set<AnyHashable>)
    func didChangeValue(forKey key: String, withSetMutation mutationKind: NSKeyValueSetMutationKind, using objects: Set<AnyHashable>)
    func addObserver(_ observer: NSObject, forKeyPath keyPath: String, options options: NSKeyValueObservingOptions = [], context context: UnsafeMutableRawPointer?)
    func removeObserver(_ observer: NSObject, forKeyPath keyPath: String, context context: UnsafeMutableRawPointer?)
    func removeObserver(_ observer: NSObject, forKeyPath keyPath: String)
    func observeValue(forKeyPath keyPath: String?, of object: Any?, change change: [NSKeyValueChangeKey : Any]?, context context: UnsafeMutableRawPointer?)
    class var accessInstanceVariablesDirectly: Bool { get }
    func value(forKey key: String) -> Any?
    func setValue(_ value: Any?, forKey key: String)
    func validateValue(_ ioValue: AutoreleasingUnsafeMutablePointer<AnyObject?>, forKey inKey: String) throws
    func mutableArrayValue(forKey key: String) -> NSMutableArray
    func mutableOrderedSetValue(forKey key: String) -> NSMutableOrderedSet
    func mutableSetValue(forKey key: String) -> NSMutableSet
    func value(forKeyPath keyPath: String) -> Any?
    func setValue(_ value: Any?, forKeyPath keyPath: String)
    func validateValue(_ ioValue: AutoreleasingUnsafeMutablePointer<AnyObject?>, forKeyPath inKeyPath: String) throws
    func mutableArrayValue(forKeyPath keyPath: String) -> NSMutableArray
    func mutableOrderedSetValue(forKeyPath keyPath: String) -> NSMutableOrderedSet
    func mutableSetValue(forKeyPath keyPath: String) -> NSMutableSet
    func value(forUndefinedKey key: String) -> Any?
    func setValue(_ value: Any?, forUndefinedKey key: String)
    func setNilValueForKey(_ key: String)
    func dictionaryWithValues(forKeys keys: [String]) -> [String : Any]
    func setValuesForKeys(_ keyedValues: [String : Any])
    func fileManager(_ fm: FileManager, shouldProceedAfterError errorInfo: [AnyHashable : Any]) -> Bool
    func fileManager(_ fm: FileManager, willProcessPath path: String)
    func perform(_ aSelector: Selector, with anArgument: Any?, afterDelay delay: TimeInterval, inModes modes: [RunLoopMode])
    func perform(_ aSelector: Selector, with anArgument: Any?, afterDelay delay: TimeInterval)
    class func cancelPreviousPerformRequests(withTarget aTarget: Any, selector aSelector: Selector, object anArgument: Any?)
    class func cancelPreviousPerformRequests(withTarget aTarget: Any)
    func attemptRecovery(fromError error: Error, optionIndex recoveryOptionIndex: Int, delegate delegate: Any?, didRecoverSelector didRecoverSelector: Selector?, contextInfo contextInfo: UnsafeMutableRawPointer?)
    func attemptRecovery(fromError error: Error, optionIndex recoveryOptionIndex: Int) -> Bool
    var autoContentAccessingProxy: Any { get }
    class func version() -> Int
    class func setVersion(_ aVersion: Int)
    var classForCoder: AnyClass { get }
    func awakeAfter(using aDecoder: NSCoder) -> Any?
    func provideImageData(_ data: UnsafeMutableRawPointer, bytesPerRow rowbytes: Int, origin x: Int, _ y: Int, size width: Int, _ height: Int, userInfo info: Any?)
}
extension NCWidgetController : CVarArg {
}
extension NCWidgetController : Equatable, Hashable {
    var hashValue: Int { get }
}
CVarArg, Equatable, Hashable

Declaration
From
protocol NCWidgetProviding : NSObjectProtocol {
    optional func widgetPerformUpdateWithCompletionHandler(_ completionHandler: (NCUpdateResult) -> Void)
    optional func widgetMarginInsetsForProposedMarginInsets(_ defaultMarginInsets: UIEdgeInsets) -> UIEdgeInsets
}
To
protocol NCWidgetProviding : NSObjectProtocol {
    optional func widgetPerformUpdate(completionHandler completionHandler: @escaping (NCUpdateResult) -> Swift.Void)
    optional func widgetActiveDisplayModeDidChange(_ activeDisplayMode: NCWidgetDisplayMode, withMaximumSize maxSize: CGSize)
    optional func widgetMarginInsets(forProposedMarginInsets defaultMarginInsets: UIEdgeInsets) -> UIEdgeInsets
}

DeclarationDeprecation
From
optional func widgetMarginInsetsForProposedMarginInsets(_ defaultMarginInsets: UIEdgeInsets) -> UIEdgeInsets
--
To
optional func widgetMarginInsets(forProposedMarginInsets defaultMarginInsets: UIEdgeInsets) -> UIEdgeInsets
iOS 10.0

Declaration
From
optional func widgetPerformUpdateWithCompletionHandler(_ completionHandler: (NCUpdateResult) -> Void)
To
optional func widgetPerformUpdate(completionHandler completionHandler: @escaping (NCUpdateResult) -> Swift.Void)

DeclarationIntroductionDeprecation
From
class func notificationCenterVibrancyEffect() -> UIVibrancyEffect
iOS 8.1--
To
class func notificationCenter() -> UIVibrancyEffect
iOS 8.0iOS 10.0