UIViewImage推送到STORYBOARD中的新UIViewController

时间:2013-07-31 15:43:57

标签: ios uiimageview uistoryboard uistoryboardsegue

通过thisthis之类的问题,我知道如何以编程方式UIViewImage推送UIViewController

但是我怎样才能完全在 Storyboard 中完成这项工作?我喜欢 Storyboard ,并希望到处都没有多个xib文件。

我已经通过 Storyboard 启用了用户互动,但我仍然无法创建过渡...

enter image description here

1 个答案:

答案 0 :(得分:1)

  1. 将UIViewController对象拖到Storyboard画布上
  2. 选择ViewController,然后在顶部菜单栏中单击编辑器>嵌入>导航控制器。
  3. 将另一个UIViewController拖到Storyboard
  4. 控制从第一个UIViewController拖动到新的UIViewController,并从结果选项中选择push。
  5. 单击已创建的Segue,然后转到Attributes检查器并输入Segue的标识符。
  6. 在您正在处理UIImageView点击的ViewController代码中,请致电[self performSegueWithIdentifier:@"YourSegueIdentifier" sender:self];