MessageViewController: Inconsistent text view font
The latest release, 0.2.0, is causing the font to change in the text view as I type. Also introducing the left button has caused some really strange layout issues. For example, if I set showsLeftButton
to false, the insets are rendered completely off center.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 20 (9 by maintainers)
@rnystrom I’ll work on that upcoming weekend.
@rnystrom Never mind, my bad. I was thinking the same code was used in the example but that works fine.
I did find the problem, the textview uses an attributed string and uses different font sizes. The first character is the correct font but all the other after that use pointSize 17.0. If I input a simple text: Jj and print the attributes we can see the difference between the 2 letters. The reason why is unclear to me yet. Any suggestions?
@AndrewBarba I had the same problem. You can fix this by settings your inset before your settings the left- and right button properties.
If you set the inset afterwards you get weird behaviour indeed because the calculation rely on the insets.
@rnystrom I’m still seeing really strange layout and font issues on 0.2.1.
On load:
After typing:
And here’s my config:
Yup makes sense. While you’re fixing that, any chance you can decouple the font property from setting the font for text view and all buttons? I’d prefer to set the fonts individually