I want : UIscrollview with non scrolling button
I'd like to put the following interface in place : I'd like to have a uiscrollview taking all the screen (big picture to be zoomed...) On top of that "scrolling image" : I'd like have 2 buttons (e.g.back and instructions) redirecting th user to other views.
Could you drop me a code snippet where I understand how to organize the UIView and UIScrollview in order to have scrolling la开发者_如何学JAVAyer but with selectable non scrolling buttons on top of it ?
many thanks...
Simple:
Container view | +--- Scroll view | | | +--- Scroll view's content view | +--- Button 1 | +--- Button 2
Hum, indeed no one would understand what I wrote ... even me. Sorry for that.
Before asking the question on stackoverflow, I had a try on UIScrollView. The situation is : 1) I've got a xib and a viewcontroller file with 2 buttons that are working perfectly. 2) I implement in the code the scrollview (filling the window bounds) and add it from the code to the current view (self.view addsubview ...) Result : only the scrollview is displayed and no button is visible.
I guess it comes from the fact that I did not add a scrollview in the xib files (using interface builder) ...
So now, with YOUR answer, I guess I need to create the view tree you wrote above in the xib file (interface builder) and link the controller view to each view element.
Except the Scroll view's content view which I'll create dynamically from the controller code.
Is it more clear ? ;-)
精彩评论