UIViewImage 推送到故事板中的新 UIViewController [英] UIViewImage push to new UIViewController IN STORYBOARD

查看:33
本文介绍了UIViewImage 推送到故事板中的新 UIViewController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自诸如thisthis,我知道如何以编程方式将 UIViewImage 推送到新的 UIViewController.

From questions like this and this, I know how to have a UIViewImage push to a new UIViewController programatically.

但是我怎样才能在故事板中完全做到这一点?我喜欢 Storyboard 并且不想到处都有多个 xib 文件.

But how can I do this in completely in Storyboard? I like Storyboard and would like to not have multiple xib files everywhere.

我已经通过故事板启用了用户交互,但我仍然无法创建过渡...

I've already enable User Interaction through Storyboard, but I still can't create a transition...

推荐答案

  1. 将 UIViewController 对象拖到 Storyboard 画布上
  2. 选择该 ViewController,然后在顶部菜单栏中,点击 Editor > Embed in > Navigation Controller.
  3. 将另一个 UIViewController 拖到 Storyboard 上
  4. 控制从第一个 UIViewController 拖动到新的 UIViewController 并从结果选项中选择推送.
  5. 点击创建的 Segue 并转到属性检查器并输入 Segue 的标识符.
  6. 在处理 UIImageView 点击的 ViewController 代码中,调用 [self performSegueWithIdentifier:@"YourSegueIdentifier" sender:self];

这篇关于UIViewImage 推送到故事板中的新 UIViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆