当前位置: 动力学知识库 > 问答 > 编程问答 >

ios - Custom Tabgroup Appcelerator

问题描述:

I'm trying to make a custom tabgroup in appcelerator in which one (or two) of the tabs is bigger than the rest. I have attached an image of what I'm trying to pull off.

I am able to make a custom tabgroup, but it refreshes each time I change a tab, and I want my tabs to behave like a native tabgroup. Any help would be much appreciated

网友答案:

As you mentioned in a comment, on iOS the tab group it itself a view. You can add views to it, and they will persist regardless of which tab is active. Because you can programmatically change the active tab, you can overlay views on top of the normal tab group and use them to decide which tab should be active.

The following Gist demonstrates this: https://gist.github.com/853935

网友答案:

I figured out this issue. For anyone that has this same issue in the future this should help: The tabgroup is its own view. If you want to add overlays to it, make a new view, and add it to the tabgroup, NOT to the window itself.

网友答案:

This also looks promising:

https://github.com/viezel/NappUI#tabgroup

You can set a background image for active tab background. The advantage to this approach is that it uses the native iOS API. Actually, it will extend the Titanium tabgroup proxy and add some methods. No hacks required.

分享给朋友:
您可能感兴趣的文章:
随机阅读: