Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图在通过编码创建的按钮和在情节提要中创建的视图之间进行切换?
(按钮不在情节提要中,它是在 viewcontroller .m 类中制作的)
如果您知道解决方案,请帮助,谢谢,
如果当前的视图控制器(拥有按钮的那个)来自故事板,你可以使用 的performSegueWithIdentifier:sender:方法UIViewController,像这样:
performSegueWithIdentifier:sender:
UIViewController
[self performSegueWithIdentifier:@"mySegue" sender:sender];