When testing in simulator with Xcode 13, I noted a subtle difference in the display of WKInterfaceLabel between Watch series 6 and series 7.
WKInterfaceLabel is in a WKInterfaceGroup.
On Series 7: the text Fast Driving
is clipped with round corner at top and bottom
On Series 6, round clipping is much less (noticeable on leading F and D)
I could not find what parameter has changed in IB nor how to change this round corner value. Nor why such a change ?
Got an answer to my bug report:
Apple Watch Series 7 has more rounded corners that your interface will need to account for. You can apply additional padding to the label in WatchKit, or use the .scenePadding modifier in SwiftUI.
For more information please see the “Meet Apple Watch Series 7” Tech Talk on developer.apple.com: https://developer.apple.com/videos/play/tech-talks/10884
I could not find the WatchKit equivalent of SwiftUI .scenePadding
modifier.
So, I solved problem by testing if Watch7 (testing values of WKInterfaceDevice.current().screenBounds).
private func isWatchSeries7() -> Bool {
let watch = WKInterfaceDevice.current()
let scale = watch.screenScale
let size = watch.screenBounds.size
let watch7_41 = scale >= 2.0 && size == CGSize(width: 176, height: 215)
let watch7_45 = scale >= 2.0 && size == CGSize(width: 198, height: 242)
return watch7_41 || watch7_45
}
Of course I'll have to adapt for Series 8.
If Watch 7, I adjust insets (group is the WKInterfaceGroup):
if isWatchSeries7() { // 4.11.2021
group.setContentInset(UIEdgeInsets(top: 0, left: 2, bottom: 0, right: 0))
}
.
There were other solutions to find watch model, but did not work on simulator for testing. And would require similar adaptation when Watch 8 comes out.
https://stackoverflow.com/questions/49087330/how-to-determine-the-apple-watch-model