Tuesday, April 5, 2011

Adding stationary UIButton to UIScrollview

Hi, I am creating an app and on the third layer of the app, the view controller contains a UIScrollView with two images that scroll horizontally. I want to add a button to this view that is stationary with respect to the scroll view. So, the user can scroll the images but the button remains where it is. Is there a way for me to do this? I know I need to add the button to the UIView and not the scroll view but when I try and do that, the button is hidden to the scroll view. Can someone please help me with this. Has anyone attempted to do this? Any advice is appreciated. Thanks.

From stackoverflow
  • Try bringing the button to the front of the view hierarchy using the bringSubviewToFront method of UIView.

0 comments:

Post a Comment