繁体   English   中英

单击当前ViewController中的按钮时,如何显示当前ViewController的精确副本?

[英]How to display exact copy of current ViewController when a button in current ViewController is clicked?

我想显示另一个ViewController ,当在当前ViewController单击按钮时,该ViewController必须是具有相同UI(像Safari中一样为空的新标签)的当前ViewController副本。 为了清楚理解,当我们单击+按钮iOS Safari时,将打开Safari中的新标签页。 我想在我的项目中包含此功能。

加载副本与新建标签不同。 您正在寻找创建相同视图控制器的新实例。 因此,只需使用新的实例变量再次实例化它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM