What is the proper way to dismiss a modal when using storyboards?(使用情节提要时关闭模式的正确方法是什么?)
问题描述
使用情节提要,关闭模式的正确方法是什么?
Using storyboards, what is the proper way to dismiss a modal?
- 使用 IBAction 并编写代码在单击按钮后关闭?
- 在单击按钮后使用 segue 并通知父视图控制器?
推荐答案
看这里 关闭呈现的视图控制器 大约一半
当需要关闭呈现的视图控制器时,首选方法是让呈现的视图控制器关闭它.
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
这篇关于使用情节提要时关闭模式的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!