iosswiftuser-interfaceuikitpreferslargetitles

What are the font attributes of the text in prefersLargeTitles property?


I'm trying to re-create the look of the prefersLargeTitles property. To that end, I was wondering if anyone can tell me the font and font size used for this property?

The reason why I'm trying to re-create this on my own is that when I hide the navigation bar in my view controller, the prefersLargeTitles property becomes automatically disabled and hidden. So the goal is to re-create this property as a custom UILabel instead.


Solution

  • TL:DR

    Font Color
    SFUI-Bold 34.00pt labelColor

    You can check using the Debug View Hierarchy.

    Debug View Hierarchy

    Here's all the properties:

    Object

    Class name Address
    UILabel 0x13680d3b0

    Label

    Text Text Lines Behavior
    Title White:0 Alpha:1 (labelColor) 1 Enabled On
    Plain Text .SFUI-Bold 34.00pt Highlighted off
    Aligned Natural
    Baseline Line Break Min Font Scale
    Align Baselines Truncate Tail 0
    Highlighted Shadow Shadow Offset
    nil color nil color w 0 h -1

    View

    Layer Layer Class Content Mode Tag Interaction
    <_UILabelLayer: 0x600003cae350> _UILabelLayer Left 0 User Interaction Enabled Off, Multiple Touch Off
    Alpha Background Tint
    1 White:0 Alpha:0 (clearColor) R:0 G:0.48 B:1 A:1 (systemBlueColor)
    Drawing
    Opaque On
    Hidden Off
    Clears Graphics Context On
    Clip To Bounds Off
    Autoresize Subviews On

    Accessibility (Is Accessibility Element, Not Focused)

    Value Traits Elements Description Hint Identifier Actions
    null Header null Title null null null