Search code examples
apple-watch

Apple Watch : How to know the screen size?


I would like to understand how we can know whether the apple watch is 38mm or 42mm so that I can programmatically set the images for UI elements.


Solution

  • I figured it out in WKInterfaceDevice class

    NSLog(@"%@", CGRectCreateDictionaryRepresentation([WKInterfaceDevice currentDevice].screenBounds));
    

    42mm { Height = 195; Width = 156; X = 0; Y = 0; }

    38mm { Height = 170; Width = 136; X = 0; Y = 0; }