手动打开故事板视图 [英] Open Storyboard-view manually
本文介绍了手动打开故事板视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个使用Storyboard的应用程序。在一个视图上有一个AlertViewDialog。
I have an application using Storyboard. On a view there is an AlertViewDialog.
当用户点击第一个按钮(是)时,如何在故事板上打开另一个视图?
When the user clicks the first button ("Yes"), how can I open an other view on the Storyboard?
推荐答案
我可以帮忙:
- 拖动一个视图然后转到Identity Inspector(快捷方式:选项+ apple + 3)。
- 选择新拖动的视图,并从标题故事板ID中的标识检查器中提供唯一名称。
//查看图片以供参考
创建viewController的SecondViewController类(.h& .m)子类。
create SecondViewController class (.h &.m) subclass of viewController .
然后从提醒视图代码(正如您在点击是时所述)
then from alert view code (as you said when YES is clicked )
粘贴下面提到的代码
SecondViewController *svc =[self.storyboard instantiateViewControllerWithIdentifier:@"vinay"];
[svc setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
[self presentViewController:svc animated:YES completion:nil];
如果发生任何问题,请告诉我。
let me know if any issues occur.
这篇关于手动打开故事板视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文