【问题标题】:Three20 TTLauncherItem in a custom positionThree20 TTLauncherItem 在自定义位置
【发布时间】:2012-02-29 12:45:51
【问题描述】:

当我将新的 TTLauncherItem 图标添加到 TTLauncherView 时,此图标设置在最后一个位置。我可以把它放在另一个位置吗?我该怎么做?

【问题讨论】:

    标签: iphone three20 ttlauncherview ttlauncheritem


    【解决方案1】:

    子类 TTLauncherView 并覆盖...

    - (void)addItem:(TTLauncherItem*)item animated:(BOOL)animated;
    

    如果您在 TTLauncherView 中查看该方法,您可以看到它是如何通过使用...获取要添加到的页面的...

    NSMutableArray* page = [self pageWithFreeSpace:self.currentPageIndex];
    

    因此,您可以选择第一页或其他任何内容,而不是这样做。拥有要添加的页面后,您可以将项目放在任何您想要的位置。 Page 只是一个 NSMutableArray 的 TTLauncherItems。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-22
      • 2023-03-04
      相关资源
      最近更新 更多