VojtaStavik/VSTextField

new extension

muratonal opened this issue · 5 comments

I added new property to your codes.Maybe users want to use formatting text ;)

var useFormattingText:Bool = false

override var text: String! {

        set {

            super.text = newValue
            textDidChange() // format string properly even when it's set programatically
        }

        get {
            if (self.useFormattingText){
                return super.text
            }else{
                return formatting == .NoFormatting ? super.text : finalStringWithoutFormatting
            }

        }
    }

That's a very interesting idea. I'd maybe prefer to have a special function for this to avoid introducing new unnecessary state.

Can you create a PR for this?

Excuse me. What is PR and how can i create PR?

@muratonal it means Pull Request. Check out this article https://guides.github.com/activities/contributing-to-open-source/ , you should find everything you need in there.

I'm going to close this issue for now.

excuse me I cant use github if you want i can send to you new VSTextField.swift file