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

Use Storyboards #30

Open
mbcoder17 opened this issue Jul 17, 2015 · 2 comments
Open

Use Storyboards #30

mbcoder17 opened this issue Jul 17, 2015 · 2 comments

Comments

@mbcoder17
Copy link

I am having an issue using storyboards with this library. I set the class of one of my VC's to JLTextViewController, but I have 2 separate views in my VC and I want to assign the textview to one of them. When I try to do this the view just loads with a black background without the textview. I think it has to do with the initializers in JLTextView but I am not sure how to fix it.

@Anviking
Copy link
Owner

The thing is that JLTextView needs to call super.init(frame: frame, textContainer: textContainer). Not sure how to achieve that.

  • Wild idea: Call super.init(frame: frame, textContainer: textContainer) from init(coder)

The one thing JLTextViewController does, except for being a ViewController, is setting scrollView insets on keyboard size updates. Not sure how that will work if the JLTextView is not at the bottom.

So I'd just:

  • Don't subclass JLTextViewController, create JLTextView programatically. Copy and adjust content inset resizing code.

@mbcoder17
Copy link
Author

Thanks! I was able to get around all of that by using JLTextViewController in my storyboard, then having another VC with a container view.

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

2 participants