开发者

Using constants in Nib files

I have an App with few Nibs, the Nibs are built according to a color scheme. Now I have a requirement to change the color scheme. So I need to go to each Nib, and each component in it and change its color.

I was wondering whether I can tell the Nib to read the color from a "#define" so it would be easy to make these kind of changes in the future.

Or any other way to chan开发者_开发问答ge the Nib content not by going to each Nib and changing it but by doing it is a central place.


There is currently no way to use constants or defined symbols inside the context of a Nib file. You should consider filing an enhancement request with Apple at http://bugreporter.apple.com for this functionality.


Wouldn't be suitable to set IBOutlet for each element that required color customization and then set color in code?


Even after creating the nib with some other colour, you can still change its the background colour's value in lets say the viewDidLoad function or in any other function to the #define-ed value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜