Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Editable state is true by default when using @IBOutlet. #137

Open
2 of 3 tasks
alielsokary opened this issue Feb 9, 2020 · 3 comments
Open
2 of 3 tasks

Editable state is true by default when using @IBOutlet. #137

alielsokary opened this issue Feb 9, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@alielsokary
Copy link

What is the purpose of your issue?

  • Bug
  • Question
  • Other

Description

Is there a way to make isEditable false by default when using @IBOutlet?

Version:

  • OS w/ Version: [e.g. iOS 12]
  • RichTextView Version [e.g. v1]
@BisuGit
Copy link
Collaborator

BisuGit commented Feb 28, 2020

Hey, thanks for using the library and I hope it's been helpful to you so far. Regarding your issue, looking at the required init in RichTextView.Swift you can see that isEditable is already false by default.

   required init?(coder aDecoder: NSCoder) {
        self.input = ""
        self.richTextParser = RichTextParser()
        self.textColor = UIColor.black
        self.isSelectable = true
        self.isEditable = false
        super.init(coder: aDecoder)
        self.setupSubviews()
    }

You can verify this by running the example project in the repo where RichTextView is set up as an IBOutlet. If you still have any problems, please send some sample code over so we can attempt to reproduce and fix the issue if possible.

@BisuGit BisuGit added the bug Something isn't working label Feb 28, 2020
@alielsokary
Copy link
Author

Actually in the example project I can edit and cut the content of RichTextView label.
I thought of disabling the user interaction on the label but I want to be able to click on links. and at the same time to set isEditable to false.

@alielsokary
Copy link
Author

alielsokary commented May 18, 2020

@BisuGit Any updates on this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants