开发者

Is it possible to move a UIView and not its subviews?

I h开发者_开发百科ave a UIPickerView added as a subview to my main view. I also have a series of textfields in the main view, so the picker view covers some up. So I was wondering if it is possible to move the main view (containing textfields) while the picker view (subview added to main view) remains stationary?


The only way to accomplish this would be to move the subview by the same amount in the opposite direction, negating the child view's movement. So, for example, if I move the parent's x origin +42 pixels, I should move the child's x origin -42 pixels. This can be encapsulated pretty easily into a single call.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜