Changes

Working with Images in WatchKit

16 bytes added, 21:00, 1 February 2016
m
Text replacement - "<google>BUY_WATCHKIT</google>" to "<htmlet>watchos2_upgrade</htmlet>"
<googlehtmlet>BUY_WATCHKITwatchos2_upgrade</googlehtmlet>
In tests on an original PNG image file of 2448 x 3264 pixels with a size of 23MB the transfer time was reduced from approximately 3 minutes down to just 6 seconds after the image was compressed using the above code.
<googlehtmlet>BUY_WATCHKITwatchos2_upgrade</googlehtmlet>
== Specifying the WKInterfaceImage Object Dimensions in Code ==
Figure 21-6
<googlehtmlet>BUY_WATCHKITwatchos2_upgrade</googlehtmlet>
It is also possible to specify fixed height and width properties for a WKInterfaceImage object from within the code of the corresponding interface controller class. This involves establishing an outlet connection to the image object and making calls to the setHeight and setWidth methods of that instance, for example:
<googlehtmlet>BUY_WATCHKITwatchos2_upgrade</googlehtmlet>