PDA

View Full Version : Set Subview As Static While Animating?




Darkroom
Aug 19, 2009, 08:55 AM
i have a UIView with many subviews. the UIView moves across the screen, carrying all of it's subviews along for the ride. however, i would like to clip the subviews of the UIView that is animating, and select some of it's subviews to remain static, while the other subviews move across the screen with the parent view.

is this possible?

[EDIT] currently, to give the illusion that a subview is remaining static, i'm animating it in the opposite direction of the parent's view animation. perhaps this is the only official way to achieve this?



PhoneyDeveloper
Aug 19, 2009, 11:35 AM
Why don't you just animate the subviews that you want to move and not animate those you wish to not move? Or you could move the static views to a single parent view and the moving views to another parent view, which then moves.

Darkroom
Aug 19, 2009, 11:39 AM
the reason is because there are other views visible below the parent view that i'm animating, which animates onto the screen to cover some of the view that is currently visible. it's a sticky situation.