水平滚动不能在three20项目的tabBar中工作?

时间:2009-05-27 20:05:36

标签: iphone objective-c cocoa-touch three20

我正在使用Joe Hewitt的three20开源项目。

在UITableViewController中包含以下代码:

_tabBar1 = [[TTTabStrip alloc] initWithFrame:CGRectMake(0, 0, 320, 41)];
_tabBar1.tabItems = [NSArray arrayWithObjects:
                [[[TTTabItem alloc] initWithTitle:@"item1"] autorelease],
                [[[TTTabItem alloc] initWithTitle:@"item2"] autorelease],
                [[[TTTabItem alloc] initWithTitle:@"item3"] autorelease],
                [[[TTTabItem alloc] initWithTitle:@"item4"] autorelease],
                [[[TTTabItem alloc] initWithTitle:@"item5"] autorelease],
                [[[TTTabItem alloc] initWithTitle:@"item6"] autorelease],                   nil];
self.tableView.tableHeaderView= _tabBar1;

除了TabBarStrip不会水平滚动外,一切似乎都运行正常吗?知道为什么会发生这种情况以及任何可能的解决方案吗?

2 个答案:

答案 0 :(得分:1)

以下是我做错了:

在项目设置中,在其他链接器标志下,我没有添加“all_load”,我只添加了“ObjC”。

答案 1 :(得分:0)

Three20源代码中不再提供

TTTabStrip。您可能希望将代码迁移到新的TTTabBar类。

您知道TTTabStrip视图是否意图水平滚动吗?在标签条中有这么多项似乎是一个用户界面,对于像iPhone这样的设备而言过于复杂。

相关问题