What is the default font of the title
of a UIBarButtonItem
with a style
of UIBarButtonItemStyleDone
?
The following just returns nil
:
[doneBarButtonItem titleTextAttributesForState:UIControlStateNormal]
What is the default font of the title
of a UIBarButtonItem
with a style
of UIBarButtonItemStyleDone
?
The following just returns nil
:
[doneBarButtonItem titleTextAttributesForState:UIControlStateNormal]
[UIFont boldSystemFontOfSize:17]
Note: I confirmed this by doing:
UIFont *font = [UIFont boldSystemFontOfSize:17];
[doneBarButtonItem setTitleTextAttributes:@{NSFontAttributeName: font}
forState:UIControlStateNormal];
And then, I took screenshots of the before & after and compared them. They were identical.
UIBarButtonItem
title font. In any case, the slider in Settings > General > Text Size was directly in the middle upon precisely confirming this answer. –
Vex You can retrieve the default font for a UILabel (which includes UIBarButton's title label) by querying
UIFont.systemFont(ofSize: UIFont.labelFontSize)
© 2022 - 2024 — McMap. All rights reserved.