以编程方式隐藏和显示 WKInterfaceGroup [英] hide and show WKInterfaceGroup programmatically

查看:27
本文介绍了以编程方式隐藏和显示 WKInterfaceGroup的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 xCode 6.2 beta 2 并尝试以编程方式隐藏和显示组,但没有显示我可以编写 group.hidden=YESgroup.hidden=NO 的方法有没有其他方法可以做同样的事情?

解决方案

是的,WKInterfaceGroup中没有隐藏组的属性.
但是 WkInterfaceObject 中也有相同的属性,它是 WKInterfaceGroup 的超类.

所以你可以像
[group setHidden:YES]

[group setHidden=NO]

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=NO Is there any another method for doing same?

解决方案

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]

这篇关于以编程方式隐藏和显示 WKInterfaceGroup的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆