Unselect (Unhiglight) TTTabItem dynamically?

13 views
Skip to first unread message

Martib

unread,
May 4, 2010, 6:14:21 AM5/4/10
to Three20
Hello friends,

I have four TabBarItem (TTTabItem) in a TabBar (TTTabBar). In one
case, i want to remove the TabBarItem selection from any of the four
TabBarItems (TTTabItem) . i.e., the complete TabBar will not show any
TabBarItems selected. Can i achieve it?
I tried the following,
[_tabBar1 setSelectedTabItem:nil];

But it is crashing.

Could someone guide me to resolve this?

I need help urgently.

(OR)
If we clicked on one TabBarItem(TTTabItem), then again clicking on
same TabBarItem(TTTabItem) will not call/execute anything right. Can i
make it always clicking on a TabBarItem, should call "(void)tabBar:
(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item" (or) any other
relevant system functions?


Thank you.

--
You received this message because you are subscribed to the Google Groups "Three20" group.
To post to this group, send email to thr...@googlegroups.com.
To unsubscribe from this group, send email to three20+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/three20?hl=en.

Martib

unread,
May 4, 2010, 2:31:27 PM5/4/10
to Three20
I need your helps urgently, could someone guide me for my issue?

Martib

unread,
May 4, 2010, 5:55:16 PM5/4/10
to Three20
Anyone please???

Aaron Brethorst

unread,
May 4, 2010, 6:07:52 PM5/4/10
to thr...@googlegroups.com
Setting the selected tab item to nil seems to work fine for me in the TTCatalog demo app. did you try debugging it and figuring out where the crash is occurring?

This is against three20 sync'd up to c78faeb82235b42ae63f856f357946d728464ba0, from April 9.

Martib

unread,
May 5, 2010, 2:09:03 AM5/5/10
to Three20
Thanks very much Aaron, i'll definitely try and let you know.
And what is this about -> "This is against three20 sync'd up to
c78faeb82235b42ae63f856f357946d728464ba0, from April 9."

Thanks again.

Martib

unread,
May 5, 2010, 3:29:52 AM5/5/10
to Three20
Hi,

When i have added like "[_tabBar1 setSelectedTabItem:nil];" i am
observing the crash with the following log.

"*** Terminating app due to uncaught exception 'NSRangeException',
reason: '*** -[NSCFArray objectAtIndex:]: index (2147483647( or
possibly larger)) beyond bounds (3)'"

What could be the reason as the code line is not making anything to
goes beyond right?
(or)
After, "[_tabBar1 setSelectedTabItem:nil];" do i need to update the
scrolltabbarview or something? Could you please give me some sample
code snippet?

Thanks.

Sai Tat Lam

unread,
Feb 6, 2012, 11:51:58 PM2/6/12
to thr...@googlegroups.com
setting [_tabBar1 setSelectedTabItem:nil]; will cause the underlying tabItems to crash with array out of bounds error.

By reading the Three20 source code, to unselect a selected tab, do this:

_tabBar1.selectedTabView.selected = NO;

This will force the selected bar to switch it's control state to deselected.
Reply all
Reply to author
Forward
0 new messages