Documentation Archive Developer
Search

WatchKit Changes

WatchKit

Modified WKAccessibilityImageRegion.label
Declaration
From
var label: String!
To
var label: String

Modified WKInterfaceButton.setBackgroundColor(UIColor?)
DeclarationIntroduction
From
func setBackgroundColor(_ color: UIColor!)
iOS 8.2
To
func setBackgroundColor(_ color: UIColor?)
iOS 8.3

Modified WKInterfaceController.init()
Declaration
From
init!()
To
init()

Modified WKInterfaceController.handleUserActivity([NSObject: AnyObject]?)
DeclarationIntroduction
From
func handleUserActivity(_ userInfo: [NSObject : AnyObject]!)
iOS 8.2
To
func handleUserActivity(_ userInfo: [NSObject : AnyObject]?)
iOS 8.3

Modified WKInterfaceController.openParentApplication([NSObject: AnyObject], reply:(([NSObject: AnyObject]!, NSError!) -> Void)?) -> Bool [class]
DeclarationIntroduction
From
class func openParentApplication(_ userInfo: [NSObject : AnyObject]!, reply reply: (([NSObject : AnyObject]!, NSError!) -> Void)!) -> Bool
iOS 8.2
To
class func openParentApplication(_ userInfo: [NSObject : AnyObject], reply reply: (([NSObject : AnyObject]!, NSError!) -> Void)?) -> Bool
iOS 8.3

Modified WKInterfaceController.presentTextInputControllerWithSuggestions([AnyObject]?, allowedInputMode: WKTextInputMode, completion:([AnyObject]!) -> Void)
DeclarationIntroduction
From
func presentTextInputControllerWithSuggestions(_ suggestions: [AnyObject]!, allowedInputMode inputMode: WKTextInputMode, completion completion: (([AnyObject]!) -> Void)!)
iOS 8.2
To
func presentTextInputControllerWithSuggestions(_ suggestions: [AnyObject]?, allowedInputMode inputMode: WKTextInputMode, completion completion: ([AnyObject]!) -> Void)
iOS 8.3

Modified WKInterfaceController.reloadRootControllersWithNames([AnyObject], contexts:[AnyObject]?) [class]
DeclarationIntroduction
From
class func reloadRootControllersWithNames(_ names: [AnyObject]!, contexts contexts: [AnyObject]!)
iOS 8.2
To
class func reloadRootControllersWithNames(_ names: [AnyObject], contexts contexts: [AnyObject]?)
iOS 8.3

Modified WKInterfaceController.updateUserActivity(String, userInfo:[NSObject: AnyObject]?, webpageURL: NSURL?)
DeclarationIntroduction
From
func updateUserActivity(_ type: String!, userInfo userInfo: [NSObject : AnyObject]!, webpageURL webpageURL: NSURL!)
iOS 8.2
To
func updateUserActivity(_ type: String, userInfo userInfo: [NSObject : AnyObject]?, webpageURL webpageURL: NSURL?)
iOS 8.3

Modified WKInterfaceDevice.cachedImages
Declaration
From
var cachedImages: [NSObject : AnyObject]! { get }
To
var cachedImages: [NSObject : AnyObject] { get }

Modified WKInterfaceImage.setTintColor(UIColor?)
DeclarationIntroduction
From
func setTintColor(_ tintColor: UIColor!)
iOS 8.2
To
func setTintColor(_ tintColor: UIColor?)
iOS 8.3

Modified WKInterfaceMap.addAnnotation(CLLocationCoordinate2D, withImage: UIImage?, centerOffset: CGPoint)
DeclarationIntroduction
From
func addAnnotation(_ location: CLLocationCoordinate2D, withImage image: UIImage!, centerOffset offset: CGPoint)
iOS 8.2
To
func addAnnotation(_ location: CLLocationCoordinate2D, withImage image: UIImage?, centerOffset offset: CGPoint)
iOS 8.3

Modified WKInterfaceMap.addAnnotation(CLLocationCoordinate2D, withImageNamed: String?, centerOffset: CGPoint)
DeclarationIntroduction
From
func addAnnotation(_ location: CLLocationCoordinate2D, withImageNamed name: String!, centerOffset offset: CGPoint)
iOS 8.2
To
func addAnnotation(_ location: CLLocationCoordinate2D, withImageNamed name: String?, centerOffset offset: CGPoint)
iOS 8.3

Modified WKInterfaceObject.setAccessibilityImageRegions([AnyObject])
DeclarationIntroduction
From
func setAccessibilityImageRegions(_ accessibilityImageRegions: [AnyObject]!)
iOS 8.2
To
func setAccessibilityImageRegions(_ accessibilityImageRegions: [AnyObject])
iOS 8.3

Modified WKInterfaceSwitch.setAttributedTitle(NSAttributedString?)
DeclarationIntroduction
From
func setAttributedTitle(_ attributedTitle: NSAttributedString!)
iOS 8.2
To
func setAttributedTitle(_ attributedTitle: NSAttributedString?)
iOS 8.3

Modified WKInterfaceSwitch.setColor(UIColor?)
DeclarationIntroduction
From
func setColor(_ color: UIColor!)
iOS 8.2
To
func setColor(_ color: UIColor?)
iOS 8.3

Modified WKInterfaceSwitch.setTitle(String?)
DeclarationIntroduction
From
func setTitle(_ title: String!)
iOS 8.2
To
func setTitle(_ title: String?)
iOS 8.3

Modified WatchKitErrorDomain
Declaration
From
let WatchKitErrorDomain: NSString!
To
let WatchKitErrorDomain: String