使用故事板时解雇模态的正确方法是什么? [英] What is the proper way to dismiss a modal when using storyboards?

查看:111
本文介绍了使用故事板时解雇模态的正确方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用故事板,解雇模态的正确方法是什么?

Using storyboards, what is the proper way to dismiss a modal?


  • 使用IBAction并在单击按钮后编写代码以解除?

  • 使用segue并在点击按钮后通知父视图控制器?

推荐答案

请参阅此处解雇呈现的视图控制器大约一半下来

See Here Dismissing a Presented View Controller about halfway down


当需要关闭一个呈现的视图控制器时,首选方法是让呈现视图控制器解雇它。

When it comes time to dismiss a presented view controller, the preferred approach is to let the presenting view controller dismiss it.

所以你应该使用IBAction并在点击按钮后编写代码来解雇

So you should use an IBAction and writing code to dismiss after a button click

这篇关于使用故事板时解雇模态的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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