Apple Watch set background image

前端 未结 2 572
长发绾君心
长发绾君心 2021-02-15 04:19

How can I programmatically set my WatchKit App background image? I need to set this in code as it changes depending on variable size and we need to place a label over the image.

2条回答
  •  佛祖请我去吃肉
    2021-02-15 04:43

    I used setBackgroundImageNamed: and it worked. Just pass the name of the image along with the extension. Make sure that the image is in your WatchKit app bundle or your device-side cache

    [self.groupA setBackgroundImageNamed:@"image.png"];
    

提交回复
热议问题