Open muuuh opened 9 years ago
Isn't it already possible using:
let storyboard = UIStoryboard(name: "MyStoryBoardName", bundle: nil)
var ctr1 = storyboard.instantiateViewControllerWithIdentifier("MyViewController") as UIViewController
instead of:
var ctr1 = UIViewController()
But this would mean, that the initial view needs to be written code based (set UIWindow, etc.).
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
...
self.nav = UINavigationController(rootViewController: self.controller!)
self.window?.rootViewController = self.nav
self.window?.backgroundColor = UIColor.whiteColor()
self.window?.makeKeyAndVisible()
I think the default storyboard-use would be different, like in https://github.com/StefanLage/SLPagingView#storyboard-support
Perhaps this is easier.
Actually I tried to implement the same way you talk about @muuuh but the fact if there are no Try-Catch closures in Swift so we need to implement them in Objective-C and then make a Bridging Header to use it in Swift. But Bridging Header is linked to a Project thus the user will need to make it on each project using this library, that's not a good solution. I'll figure out a better way.
Any news @StefanLage on the Storyboard solution?
I've tried using the Objective C solution but the Swift Storyboard just won't recognize the SLPagingViewController as a custom class :(
Try-Catch now available on swift 2.0
hi Stefan, Have you had any luck with the Swift storyboard implementation? Thanks again, great project.
Any news for storyboard support
Hello, are you planning to add storyboard support?
Best regards,