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
Dynamic height view #14
Comments
Hello, could you link to a sample project with the two different behaviours? |
Thanks for your time. Here's a sample project: |
Hello, private func insert(_ text: String) {
let layoutManager = NSLayoutManager()
let textStorage = MarklightTextStorage()
// Assign the `UITextView`'s `NSLayoutManager` to the `NSTextStorage` subclass
textStorage.addLayoutManager(layoutManager)
let textContainer = NSTextContainer()
layoutManager.addTextContainer(textContainer)
let view = UITextView(frame: CGRect(x: 0, y: 0, width: 100, height: 20), textContainer: textContainer)
// let view = UITextView()
view.isScrollEnabled = false
let last = scrollView.subviews.last!
scrollView.addSubview(view)
view.autoPinEdge(.top, to: .bottom, of: last, withOffset: 8)
view.autoPinEdge(toSuperviewEdge: .left, withInset: 8)
view.autoPinEdge(toSuperviewEdge: .right, withInset: 8)
} I'm closing the issue as it seems that it was caused by a wrong client-side implementation. |
Marklight looks great, fantastic work!
When using a plain
UITextView
, as I type the size of the view changes to fit the content/text of the view. When enablingMarklight
, this behaviour seems to stop. Do you know what could be causing this?Only constraints for the view in question are (using
PureLayout
):The text was updated successfully, but these errors were encountered: