hide and show WKInterfaceGroup programmatically

前端 未结 3 1611
孤街浪徒
孤街浪徒 2021-02-06 20:00

I\'m using xCode 6.2 beta 2 and tried to hide and show group programmatically but there is no method shown where i can write group.hidden=YES or group.hidden=

相关标签:
3条回答
  • 2021-02-06 20:14

    Yes, do it this way:

    [group setHidden:YES];
    

    In WatchKit you can't access properties with the dot notation.

    0 讨论(0)
  • 2021-02-06 20:15

    If you're using a swift you can use this code:

     mygroup.setHidden(true)// set true --> false if you want to show the group
    
    0 讨论(0)
  • 2021-02-06 20:26

    Yes, there is no property for hide group in WKInterfaceGroup.
    But there is same property available in WkInterfaceObject which is super class of WKInterfaceGroup.

    so you can do same like
    [group setHidden:YES]
    or
    [group setHidden=NO]

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