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
Post a Comment