View Full Version : iPhone - altering UI components at runtime

Jun 9, 2008, 03:43 AM

I'm fairly new to mac programming, just wanted an opinion on the best way to solve this problem.

I need to be able to dynamically change size/shape/colour/text and possibly graphic resource of most of my UI from code, depending on program state. Ideally, I'd like to index my UI components with a unique integer id (like an arrayed button in Visual Basic) for easy reference. ie. I would like to be able to make button 6 turn green, or send the text "TEST" to button 89.

Is it best to create a default UI in Interface Builder (if so, how can you create arrayed buttons?) or would it be best to create the components directly from code?

Thanks for any advice