Change in Watch 7 in rounded corners of WKInterfaceLabel or WKInterfaceGroup

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 ?

Answered by Claude31 in 693850022

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

I filed a bug report

Nov 2, 2021 at 5:53 PM – FB9735861

Accepted Answer

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

Bonjour cher @Claude31 J’ai un problème de Spam que je n’arrive pas à résoudre et j’ai constaté que sur la question vous avez beaucoup répondu à des threads. Please @Claude31help me. Mon application est sur Android et j’ai juste développé la version iOS mais Apple rejette pour motif Spam. C’est vraiment désolant de ne pas savoir concrètement ce qu’on doit changer? Faut-il avoir deux versions opposées pour une même application selon qu’on soit sur Android ou sur Apple ? Je suis prêt à discuter @Claude31 . Voici mon mail billybroni@gmail.

Change in Watch 7 in rounded corners of WKInterfaceLabel or WKInterfaceGroup
 
 
Q