4

How to add constraint in xcode 11 there is two new option available when i update xcode to xcode 11

enter image description here

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Divyesh Gondaliya
  • 884
  • 11
  • 21

3 Answers3

5

You can deselect this option and use scroll view like old version

enter image description here

Samuel Liew
  • 76,741
  • 107
  • 159
  • 260
Steve
  • 51
  • 3
4

Basically here frameLayoutGuide is an alias for ScrollView frame and contentLayoutGuide is an alias for content size. You can skip their use and position your scroll view content just like you use to before. If you want to use Layout guides, pin your contentView to contentLayoutGuide (leading, trailing, top, bottom constraints) and set your positioning constraints (centre horizontally or vertically) to frameLayoutGuide. Below is the image that shows content view positioned using layout guides.

content view positioned inside scroll view

If you want to follow old way of positioning refer this.

Shreeram Bhat
  • 2,849
  • 2
  • 11
  • 19
3

I got the answer after one hour spend. You can use scrollview like old scrollview when you give a constraints to your scrollview that time select scrollview from the options.

enter image description here

Divyesh Gondaliya
  • 884
  • 11
  • 21