Designing inside a scrollview in xcode 4.2 with storyboards

前端 未结 9 817
梦如初夏
梦如初夏 2020-11-29 02:46

I have a vertically scrolling uiscrollview - imagine an \'about this app\' page of a tab bar app which goes on a bit and requires a scrollview. It only contains a few images

9条回答
  •  猫巷女王i
    2020-11-29 03:20

    I feel your pain. The only way I found is to manually pan the scroll view in the size inspector to reveal the portion of the view that you wish to visually edit.

    Use a UIView to contain elements so they are positioned relatively to this view. Add the view as a subview to the scrollview at 0,0.

    1. pan: use the Y coordinate say to -200, then edit the contents.
    2. to place more contents in the hidden part, pan again to reveal new real-estate
    3. when finished, restore the values of the ScrollView's height and X,Y position.

    Make sure the scroll view frame rectangle is smaller than the contained view.

提交回复
热议问题