iOS app as a staged play

40 Views Asked by At

This may not be a unique question, but I don't know how to phrase it because my Google skills are insufficient.

I am writing an app framework and I am spending a lot of time writing a system to store the positions and other properties of UIView elements on the screen.

What I want to know is whether something like this already exists, since even though my system works well, I am concerned about memory usage with a large number of elements.

Basically, I subclassed UIControl and added a "state" property that stores position, alpha, colorscheme data and all forms of transforms that apply to a certain state in the interface. This is akin to actors positioned on a stage. When a scene change happens (a button is pressed, or something) the actors (UIViews) know exactly where to be and how to look from stored data.

This means that with a single button press and NSNotification, I can broadcast a simple integer that identifies the state to be in, and all necessary properties will be animated accordingly.

Am I wasting my time? Does something like this already exist. It does not appear to be included in the tools that Apple provides.

0

There are 0 best solutions below