【问题标题】:How to design UISegmentedControl view swapping similar to the Facebook 3.0 app?如何设计类似于 Facebook 3.0 应用程序的 UISegmentedControl 视图交换?
【发布时间】:2010-11-25 17:17:48
【问题描述】:

用例子可能最容易解释:

在 Facebook 3.0 应用程序中,如果您单击朋友,它会在 UISegmentedControl 中显示“Wall | Info | Photos”,其作用类似于 UITabViewController。如果您然后单击照片,它会将子视图推送到 UINavigationController 堆栈,这会将 UISegmentedControl(和父视图)滑动到左侧。我将如何构建我的应用设计以促进这一点?

即可能是:

  • UIViewController(UISegmentedControl 包含三个项目(代表三个视图)
  • ---UINavigationController
  • --------UIViewController(即墙)
  • ---------UIViewController(即对帖子的评论,被推入堆栈)
  • ---UINavigationController
  • --------UIViewController(即信息)
  • 等等……

问题是,如果我按上述方式进行设计,如果用户单击 cmets 到帖子(将 cmets 视图推送到导航控制器的堆栈),我将如何让 UISegmentedControl 与 Wall 视图一起滑开?这似乎不是最佳选择。

或者,我可以将 UISegmentedControl 作为子视图放置在每个 UINavigationController 中,但我不确定如何在 UINavigationController 之间移动它,因为用户在保持状态的同时在“选项卡”之间切换...

有没有更简单的方法来设计视图的布局?

【问题讨论】:

    标签: iphone uinavigationcontroller uisegmentedcontrol uitabview


    【解决方案1】:

    看看 Joe Hewitt 的 Three20 库。它托管在 GitHub 上。

    【讨论】:

      猜你喜欢
      • 2018-01-24
      • 2015-09-21
      • 2020-05-04
      • 1970-01-01
      • 1970-01-01
      • 2012-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多