简体   繁体   English

如何在按钮单击时加载uisplit ViewController

[英]How to load uisplit viewcontroller on button click

i am new to iPhone development. 我是iPhone开发的新手。

How to load a page having uisplitview controller on button click 如何加载按钮上具有uisplitview控制器的页面

Please help 请帮忙

some points: 一些要点:

  1. UISplitView controllers are to be used exclusively on iPad devices. UISplitView控制器只能在iPad设备上使用。 "Split view controllers are for use exclusively on iPad devices. Attempting to create one on other devices results in an exception." “拆分视图控制器只能在iPad设备上使用。尝试在其他设备上创建一个会导致异常。” in Apple developer Apple开发人员中
  2. UISplitView controllers must be the root controllers. UISplitView控制器必须是根控制器。 You may use UINavigationController and create a segue from one UIViewController to another using the storyboard (press the control key and mouse click the UIViewController to start the segue with and release the mouse button on top of the destination UIViewController). 您可以使用UINavigationController并使用情节提要板创建从一个UIViewController到另一个UIViewController的序列(按控制键并单击UIViewController以启动序列,然后释放目标UIViewController顶部的鼠标按钮)。 On a button click event use the method [self performSegueWithIdentifier:@"NameOfSegue" sender:self]; 在按钮单击事件上,使用方法[self performSegueWithIdentifier:@"NameOfSegue" sender:self]; (UIViewController method). (UIViewController方法)。 you can change the name of the segue in the storyboard when you press the segue (you will see the identifier field on the properties section on the right) 您可以在按剧情图板时在情节提要中更改该剧情的名称(您将在右侧的“属性”部分看到标识符字段)

Hope this helps. 希望这可以帮助。

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

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