Good day all;
Firstly, either a process or pseudo code is hopefully sufficient to my question (obj-c code is very welcomed if you can spare the time and effort).
I have a UIView the contains many subviews that represent a path to travel along. These subviews (notionally) have a border and hence an inner boundary in which a sprite's movement is limited to. The subviews are linked together (no border between the linkages) and so crossing from one subview to the other is required.
I have implemented an ImageView to represent the sprite and is attached to the main UIView as is the subviews.
Now, what I have done is implement the event handling and workout where the finger movements are and try to move the sprite within the confines of the subviews manually.
Is there a better approach as I have noticed that you can set boundaries on views and so on. Is there a way to allow the iPhone to manage where the sprite is allowed to move within a subview or do I have to manually compute movement limitations within a subview and then limit movement manually on the sprite.