Closed sindresorhus closed 13 years ago
This is done like this for a reason, like the real SMS app, the textfield needs to have some room. If the text field is allowed to shrink to fit the button size, there could be a possibility that the actual text field area will be too small and give a bad user experience. But if you feel the need to, go ahead and change the code, I'm not going to change it in this project.
I think you misunderstood. I'm not talking about changing the textArea
.
What I'm asking if you could make the "send" button text shrink in size when to long, instead of truncating?
Oh, I see, that makes more se sense. Let me see what I can do.
You probably want to look at adjustsFontSizeToFitWidth
This needs a couple of more tweaks.
Like you can see from the example app, the text does not align to the center vertically. This should be fixed. It should also have a padding on the left and the right side, some pixels, so that it doesn't fill out to the edge.
Can you do that?
Tested with commit 78eb297f0181c4f212d788e2f70b40657e8c8cdb
Will not fix right now, the title of the button should be something short, if you need it to be longer, modify the source code for your needs.
@pec1985 Ok, but at least keep it open, so it's not forgotten, and others may want to submit a pull request for it.
If the button title gets to long, it now truncates the text. For example "lipsum" becomes "li...um". It should instead resize the text to fit.