Anviking / Chromatism

iOS Syntax Highlighting in Swift
MIT License
100 stars 15 forks source link

Use Storyboards #30

Open mbcoder17 opened 9 years ago

mbcoder17 commented 9 years ago

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 commented 9 years ago

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

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:

mbcoder17 commented 9 years ago

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