iphone - Application dynamically choosing which icons/images to use -


i creating application able switch ui theme different colors including icons. plan have different sets of icons stored on different folders(green folder, yellow folder, etc). name of icons same across folders thing change color.

here code using when setting images buttons , icons

[menubtn setbackgroundimage:[uiimage imagenamed:@"menubtn.png"] forstate:uicontrolstatenormal] 

for example if user selected yellow app theme. internally there kind of switch choose path image ex. code above evaluate "yellow/menubtn.png" when user selects yellow or "green/menubtn.png" when user selects green. possible?

sure, can [uiimage imagenamed:[nsstring stringwithformat:@"%@/menubtn.png", colourvar]] , set colourvar prior setting image.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -