What is the recommended method of styling an iOS app?

前端 未结 7 1359
一个人的身影
一个人的身影 2020-12-14 17:46

What is the recommended method of styling an iOS app? For example, if there are multiple labels or text views how can updating font style/color at one place update the style

7条回答
  •  鱼传尺愫
    2020-12-14 18:33

    I use plists. Just as I localize strings, I use the same procedure to change themes. I coded a singleton that loads a current theme plist and a fallback plist. Then I replace the names of resources with keys and macro functions that pull the real resource name from the singleton.

    Cons: you have to set the resource for each element, not just set it in the NIB.
    Pros: once you are done, most of the next theme involves photoshop and textmate, not IB or code.

提交回复
热议问题