1

I want to know that is there any way which make change all xib's background at once.I want to make change all background of xib in one time when i change my theme name. for example : If i choose "theam1" it make change at all view at once.Then if i change to "theme2" It make again change at all.

Like in android there is "style.xml" which make change at all in one time.May i get this type of functionality in xcode?

I know we can change it to set in viewwillappear at every time or set in appdelegate file but would i do via plist or other way which make change it all view in one time? Please suggest me.

Thank you

sinh99
  • 3,909
  • 32
  • 32

1 Answers1

2

It is relatively simple if all views has same background. Follow these steps on app delegate read the imagefilename from plist or any other way you want to use which theme. Then set image in mainwindow.xib file. and make all the views in whole app transparent by setting color as clearcolor. This way window's background will be visible behind all the view controllers's view. Hope this helps.

If you want more customization read values either from xml or plist and assign images according to view controllers in viewDidLoad method.

Rahul Vyas
  • 28,260
  • 49
  • 182
  • 256
  • Hi but in it I could not get orientation because of window so image orientation is not possible at there. Is there another way for it? – sinh99 Apr 30 '12 at 10:26
  • Nope you will not get orientation effect. But I use this technique to save some memory. Because only one image will be used in whole app instead of each xib having same image – Rahul Vyas Apr 30 '12 at 10:33
  • Its really good but i have to make orientation for every view so I have to find another way. Thank you so much Rahul. – sinh99 Apr 30 '12 at 10:37