[英]Moving UIButton from UIScrollView to UIView in iPhone SDK
I am stuck with a problem actually the scene is like this in my view controller i have place several buttons which i can move within the view now in same view half of the screens is occupied by uiscrollview in this scrollview also i have several uibuttons which i want to move from uiscrollview to uiview Now when i try to move uibutton from uiscrollview to uiview it hides as it moves from the scrollview similarly as i move uibutton from uiview to uiscrollview then also it hides as my drag reaches the scrollview area. 我陷入一个问题,实际上场景是这样的,在我的视图控制器中我放置了几个按钮,现在我可以在同一个视图中的视图中移动几个按钮了。在这个滚动视图中,一半的屏幕被uiscrollview占据了,我也有几个uibutton想要从uiscrollview移至uiview现在,当我尝试将uibutton从uiscrollview移至uiview时,它会从滚动视图中隐藏,就像我将uibutton从uiview移至uiscrollview一样,然后在我的拖动到达scrollview区域时也会隐藏。
Please help me out with this problem 请帮我解决这个问题
Thanks in advance.... 提前致谢....
Your UIButtons each have a superview. 每个UIButton都有一个超级视图。 For the UIButtons in the scrollview, the UIScrollView is the superview.
对于滚动视图中的UIButton,UIScrollView是超级视图。 When you have scrollView.clipsToBounds == YES, then the UIButtons in the scrollview will become obscured if you move them outside of the visible area of the scrollview.
当您具有scrollView.clipsToBounds == YES时,如果将滚动条中的UIButton移到滚动视图的可见区域之外,则它们将变得模糊。
There are several possible solutions, including: 有几种可能的解决方案,包括:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.