LinkedInAttic / LayoutKit

LayoutKit is a fast view layout library for iOS, macOS, and tvOS.
http://layoutkit.org
Apache License 2.0
3.16k stars 267 forks source link

TextViewLayout - Why is isSelectable forced to false? #152

Closed spekke closed 7 years ago

spekke commented 7 years ago

What's the reason isSelectable is forced to false in TextViewLayout?

open override func configure(view textView: TextView) {
    super.configure(view: textView)
    ....
    textView.isSelectable = false

This prevents interactions with links etc.

From docs:

This property controls the ability of the user to select content and interact with URLs and text attachments. The default value is true.

chriscuecal commented 7 years ago

I would like to know the reason for this as well.

jingwei-huang1 commented 7 years ago

Originally, when I built it, it has the issue that the view of "copy, share..." didn't display correctly for some reason.

I just re-tested on iOS 10&11 and it looks good. I will move it before the config to allow the overridden of isSelectable

chriscuecal commented 7 years ago

Great! Thank you!

jingwei-huang1 commented 7 years ago

Raised PR https://github.com/linkedin/LayoutKit/pull/153

spekke commented 7 years ago

Ah, cool. Thanks!