Closed dmorrow closed 7 years ago
Thanks for the pull request!
I'm leaning towards exposing the textfield and the fieldLabel, but a couple of changes to your pull request would be good:
readwrite
properties in CLTokenInputView.h
. The internal properties should exist as readwrite
, and the properties in the header should be readonly
.CLBackspaceDetectingTextField
in the header; the readonly
property can just be UITextField
One of the reasons I've been hesitant to make these properties public is because now the developer can start modifying the textfield and fieldLabel in ways that breaks CLTokenInputView. For example, they might make themselves the delegate of the textField, or start changing the size of the fieldLabel.
Another approach to "exposing" these properties would be make styling methods where CLTokenInputView will call the developer's handler block (with the textField or fieldLabel as the parameter in that block), and the developer can provide styling safely there, without exposing the internals of CLTokenInputView.
If you've already moved on from wanting to work on this pull request, that's totally fine; just let me know, and I'll make the changes myself.
@rsattar If you can make the changes in the way that you're comfortable with, that's probably for the best. I think that exposing the textField and fieldLabel as parameters in a styling block would have the same issues as exposing them in the .h file. If someone wants to break it, they will find a way.
I've approached this from a different direction. See PR #44
In order to properly style the textField and fieldLabel, they need to be public properties.