Designing inside a scrollview in xcode 4.2 with storyboards

前端 未结 9 808
梦如初夏
梦如初夏 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条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-29 03:43

    I'm currently developing an app for iOS 7, and I did exactly as @Dickey Singh's answer, but it doesn't work in the beginning. After checking the storyboard, I found that we also need to add Auto Layout Constraints for the view controller who holds the scrollView. It seems that such auto layout constraints would be added automatically before Xcode 5, but now we need to do it ourselves. The way to add constraints: First select the view controller in the storyboard; Enter 'Editor' in the top menu; Select the 'Resolve Auto Layout Issues'; Select the 'Add Missing Constraints In Container'. Done :-)

提交回复
热议问题