Closed objectmethod closed 9 years ago
Thanks @objectmethod for reporting this issue. Do you want perhaps look into that layouting issue and trying to figure out how to fix that?
I just tried if I can reproduce this issue, but wasn't able to do so. Could you perhaps provide a screenshot and a code snippet how the problem appears for you?
Sure.
If we set the Dynamic Type to the lowest setting: https://www.dropbox.com/s/anznbe2prfcj1k0/IMG_0463.PNG?dl=0
And we have the following code: https://gist.github.com/objectmethod/db4658a9d22b2afd0210
I am pretty sure the problem is because we specify our font size and our app does not respect the Dynamic Type at all.
On Nov 1, 2014, at 3:04 PM, Marius Rackwitz notifications@github.com wrote:
I just tried if I can reproduce this issue, but wasn't able to do so. Could you perhaps provide a screenshot and a code snippet how the problem appears for you?
— Reply to this email directly or view it on GitHub https://github.com/mrackwitz/MRProgress/issues/76#issuecomment-61379218.
Ok, so you alter the font, then you should set the text as NSAttributedString
by the property titleLabelAttributedText
, where you specify something like @{ NSFontAttributeName: [UIFontManager AVENIR_BOOK_SIXTEEN_FONT] }
as attributes. This is an undocumented implementation detail, which is originated in the layout code. I will try to either fix or clarify that.
Putting all together:
self.hud.titleLabelAttributedText = [[NSAttributedString alloc] initWithString:label attributes:@{
NSForegroundColorAttributeName: GRAY_TEXT_COLOR,
NSFontAttributeName: [UIFontManager AVENIR_BOOK_SIXTEEN_FONT],
//NSKernAttributeName: NSNull.null, // turn on auto-kerning?
}];
Let me know if this solves your issue.
Perfect!
Thanks,
Richard Guy RichardPaulGuy@Gmail.com 770-363-2993
On Nov 3, 2014, at 8:31 AM, Marius Rackwitz notifications@github.com wrote:
Ok, so you alter the font, then you should set the text as NSAttributedString by the property titleLabelAttributedText, where you specify something like @{ NSFontAttributeName: [UIFontManager AVENIR_BOOK_SIXTEEN_FONT] } as attributes. This is an undocumented implementation detail, which is originated in the layout code. I will try to either fix or clarify that. Putting all together:
self.hud.titleLabelAttributedText = [[NSAttributedString alloc] initWithString:label attributes:@{ NSForegroundColorAttributeName: GRAY_TEXT_COLOR, NSFontAttributeName: [UIFontManager AVENIR_BOOK_SIXTEEN_FONT], //NSKernAttributeName: NSNull.null, // turn on auto-kerning? }]; Let me know if this solves your issue.
— Reply to this email directly or view it on GitHub https://github.com/mrackwitz/MRProgress/issues/76#issuecomment-61477046.
If you change the Text Size to a smaller size for iOS Dynamic Type via Settings -> Display & Brightness -> Text Size, the MRProgressOverlayView's label appears to get cut off and not display the text properly.