【发布时间】:2016-09-06 02:45:50
【问题描述】:
我正试图让这个 pod 在我的项目中工作,但我一直在理解这个位是如何工作的:
https://github.com/uacaps/PageMenu
// Create variables for all view controllers you want to put in the
// page menu, initialize them, and add each to the controller array.
// (Can be any UIViewController subclass)
// Make sure the title property of all view controllers is set
// Example:
var controller : UIViewController = UIViewController(nibName: "controllerNibName", bundle: nil)
controller.title = "SAMPLE TITLE"
controllerArray.append(controller)
我看到一些事情说我需要使用我在故事板中设置的故事板 ID 来初始化视图控制器,但是当我尝试做类似的事情时
let storyboard = UIStoryboard(name: "MyStoryboardName", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("someViewController") as! UIViewController
self.presentViewController(vc, animated: true, completion: nil)
但老实说,我不知道该放在哪里/何时放置/如果那甚至是什么
这个想法是为页面菜单制作一组视图控制器,以在顶部显示标签栏,但我不确定如何从我在情节提要中制作的视图中准确制作该数组。
【问题讨论】:
-
hii @Nichole 我正面临一个问题......当我试图从添加到 PageMenu 的 ViewController 按钮单击按钮转到子视图控制器时,需要时间来帮助我解决这个问题
标签: ios swift uiviewcontroller uistoryboard