Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/106.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/rust/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何在另一个故事板的xib文件中显示新控制器_Ios_Swift_Storyboard_Xib - Fatal编程技术网

Ios 如何在另一个故事板的xib文件中显示新控制器

Ios 如何在另一个故事板的xib文件中显示新控制器,ios,swift,storyboard,xib,Ios,Swift,Storyboard,Xib,我想在另一个故事板中为xib文件提供一个控制器 同时,我想使用这个xib来使用其他几个故事板 如何执行此操作?请按照此步骤操作 寄存器笔尖 设xibController=newviewcontrollernbname:xibController,bundle:nil 当前视图模式 self.presentViewControllerxibController,动画:true,完成:nil 尝试以下操作:let newViewController=newviewcontrollernbname:n

我想在另一个故事板中为xib文件提供一个控制器 同时,我想使用这个xib来使用其他几个故事板 如何执行此操作?

请按照此步骤操作

寄存器笔尖 设xibController=newviewcontrollernbname:xibController,bundle:nil

当前视图模式 self.presentViewControllerxibController,动画:true,完成:nil


尝试以下操作:let newViewController=newviewcontrollernbname:newViewController,bundle:nil//Present View Modally self.presentViewControllernewViewController,animated:true,completion:nil听起来你在问两个不同的问题:如何从nib文件中呈现控制器?如何从特定情节提要中呈现控制器?如果你澄清了你的问题,只问了一个问题,并且对你迄今为止所做的尝试给出了一些想法,这会有所帮助。虽然你所写的内容在技术上没有错误,但实际上没有帮助,因为不清楚这个问题实际上在问什么?您假设的是他的nib文件的名称。您还假设vc是以模式呈现的。如果它回答了一个特定的问题,而不是一系列可能的建议,那么它通常是一个更好的答案。