代码之家  ›  专栏  ›  技术社区  ›  zpesk

水平滚动在Three20项目的Tabbar中不工作?

  •  0
  • zpesk  · 技术社区  · 16 年前

    我正在使用JoeHewitt的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 回复  |  直到 16 年前
        1
  •  1
  •   zpesk    16 年前

    我做错了:

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

        2
  •  0
  •   Stephen Touset    16 年前

    TTTabStrip 在three20源代码中不再可用。您可能希望将代码迁移到新的 TTTabBar 班级。

    你知道如果 TTT摘要 视图是要水平滚动?对于iPhone这样的设备来说,标签条中包含如此多的项目似乎是一个过于复杂的用户界面。

    推荐文章