Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storyboard support? #1

Open
muuuh opened this issue Feb 6, 2015 · 7 comments
Open

Storyboard support? #1

muuuh opened this issue Feb 6, 2015 · 7 comments

Comments

@muuuh
Copy link

muuuh commented Feb 6, 2015

Hello,
are you planning to add storyboard support?

Best regards,

@mxmlnbln
Copy link

mxmlnbln commented Feb 7, 2015

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()

@muuuh
Copy link
Author

muuuh commented Feb 8, 2015

But this would mean, that the initial view needs to be written code based (set UIWindow, etc.).

https://github.com/StefanLage/SLPagingViewSwift/blob/master/Demos/TinderLike/TinderLike/AppDelegate.swift

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.

@StefanLage
Copy link
Owner

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.

@CaioJahara
Copy link

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 :(

@acegreen
Copy link

Try-Catch now available on swift 2.0

@ghost
Copy link

ghost commented Sep 8, 2015

hi Stefan,
Have you had any luck with the Swift storyboard implementation? Thanks again, great project.

@jaddoescad
Copy link

Any news for storyboard support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants