Create imageView programmatically in Watch Kit

后端 未结 1 995
执笔经年
执笔经年 2020-12-11 18:24

i\'m trying to create an image view for a watch app, i\'m trying to create programmatically but the code used in a classic view controller doesn\'t work.

let         


        
相关标签:
1条回答
  • 2020-12-11 18:52

    You can't dynamically create views in WatchKit. You need to create your entire interface in a storyboard. You can have elements of your storyboard hidden and then programmatically unhide them.

    In your storyboard you can use WKInterfaceImage to hold the image. You can set the image at runtime using setImage:.

    0 讨论(0)
提交回复
热议问题