acerbetti / ACEDrawingView

An open source iOS component to create a drawing app
Apache License 2.0
665 stars 171 forks source link

Fix DraggableTextTool adjust bug. #89

Closed Frog-Frog closed 6 years ago

Frog-Frog commented 6 years ago

Hello guys, thank for good work.

DraggableTextTool has a bug in adjust size.

It happens when you enter the first letter after expanding. acedrawingview

When ACEDrawingLabelView get text in UITextField at "shouldChangeCharactersInRange", it get the string before input, so it adjust the size with empty string.

Instead of that it need to use UIControlEventEditingChanged to get the latest string and adjust it properly.

acedrawingviewfixed