Search code examples
xmlxcodeuistoryboardxcode-storyboard

Why each font in customFonts tag is a mutable array?


For a long time I was curios about the XML behind the any storyboard file. And I try to understand each part of it.

This time I would like to know about this:

<customFonts key="customFonts">
    <mutableArray key="FontName-Bold.otf">
        <string>FontName-Bold</string>
    </mutableArray>
    <mutableArray key="FontName.otf">
        <string>FontName</string>
        <string>FontName</string>
        <string>FontName</string>
        <string>FontName</string>
        <string>FontName</string>
        <string>FontName</string>
        <string>FontName</string>
    </mutableArray>
</customFonts>

Why it is a mutable array? Why there are a lot of occurrences for the second font, but only one for the first?


Solution

  • There is one occurrence of <string>FontName</string> for each control in your storyboard which uses the font "FontName.otf". Do you only have one control with "FontName-Bold.otf" but 7 that use the regular font?