Custom Tabgroup Appcelerator

我的梦境 提交于 2019-12-11 03:00:04

问题


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


回答1:


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




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/8729140/custom-tabgroup-appcelerator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!