关于如何根据UI的版本把Tab切换成新的Notes UI Component
Sent: Monday, December 29, 2014 5:07 PM
关于如何根据UI的版本把Tab切换成新的Notes UI Component,IconTabBar控件提供了一系列操作下面的item的方法: removeItem(), addItem(), insertItem();
比如可以把新旧两个版本的notes tab都定义在XML View中,New Notes Tab里面就可以放我们定义的notes reuse component:
然后在controller的onBeforeRendering里面根据版本判断,把不需要显示的tab remove掉:
显示Notes Tab:
显示New Notes Tab:
如果用remove item这种方式,被remove的控件就不存在html document里面了,而不是被隐藏掉。
要获取更多Jerry的原创文章,请关注公众号"汪子熙":