我的故事板上有一个普通的视图控制器设置,附加到“登陆”页面快速视图控制器类。我正在尝试使用这个流行的库创建一个演练动画:https ://github.com/mamaral/Onboard
我从库的源代码中下载了 4 个文件,并使用桥接头将它们链接到我的项目中。但是当我运行这个项目时,我被卡住了。页面是空白的,什么都没有显示。Onboard 页面标题、图像,什么都没有。它是空白的。我看不出有什么问题,而且我到处搜索,没有任何信息或任何使用这个库的 Swift 示例。
有人可以帮忙吗?
这是我在“着陆”类的 viewDidLoad() 期间调用的函数中的代码。
let firstPage = OnboardingContentViewController(title: "Page Title 1", body: "Page body goes here.", image: UIImage(named: "icon"), buttonText: "Text For Button") { () -> Void in
// do something here when users press the button, like ask for location services permissions, register for push notifications, connect to social media, or finish the onboarding process
}
firstPage.titleTextColor = UIColor.blueColor()
let secondPage = OnboardingContentViewController(title: "Page Title 2", body: "Page body goes here.", image: UIImage(named: "icon"), buttonText: "Text For Button") { () -> Void in
// do something here when users press the button, like ask for location services permissions, register for push notifications, connect to social media, or finish the onboarding process
}
// Image
let onboardingVC = OnboardingViewController(backgroundImage: UIImage(named: "street_view.png"), contents: [firstPage, secondPage])
self.presentViewController(onboardingVC, animated: true, completion: nil)
谢谢