Skip to main content
added 114 characters in body
Source Link

The best way to use scrollview and auto layout is to add a view inside the scrollview and pin all its edges to scroll view and equal widths to superview, Pin all edges of scrollview to superView

  1. pin top, left , right and height of your label to your FAQ1 view.
  2. pin top of your text view to label and left right and bottom to your FAQ1 view.
  3. pin the height of your FAQ1 view, and left and right of your faq1 view to content view.
  4. Follow step 1 to 3 for all your faq views.
  5. Pin top of your faq1 view to top to top of content view
  6. Pin the top of the next faq view to bottom of the previous faq view.
  7. pin bottom of the last faq view to bottom of content view

when adding your faq1 view pin its top to top ,left and right to contentView's top left and right with necessary padding.

HopeYou can find the sample code here Hope this solves your problem

The best way to use scrollview and auto layout is to add a view inside the scrollview and pin all its edges to scroll view and equal widths to superview, Pin all edges of scrollview to superView

  1. pin top, left , right and height of your label to your FAQ1 view.
  2. pin top of your text view to label and left right and bottom to your FAQ1 view.
  3. pin the height of your FAQ1 view, and left and right of your faq1 view to content view.
  4. Follow step 1 to 3 for all your faq views.
  5. Pin top of your faq1 view to top to top of content view
  6. Pin the top of the next faq view to bottom of the previous faq view.
  7. pin bottom of the last faq view to bottom of content view

when adding your faq1 view pin its top to top ,left and right to contentView's top left and right with necessary padding.

Hope this solves your problem

The best way to use scrollview and auto layout is to add a view inside the scrollview and pin all its edges to scroll view and equal widths to superview, Pin all edges of scrollview to superView

  1. pin top, left , right and height of your label to your FAQ1 view.
  2. pin top of your text view to label and left right and bottom to your FAQ1 view.
  3. pin the height of your FAQ1 view, and left and right of your faq1 view to content view.
  4. Follow step 1 to 3 for all your faq views.
  5. Pin top of your faq1 view to top to top of content view
  6. Pin the top of the next faq view to bottom of the previous faq view.
  7. pin bottom of the last faq view to bottom of content view

when adding your faq1 view pin its top to top ,left and right to contentView's top left and right with necessary padding.

You can find the sample code here Hope this solves your problem

Source Link

The best way to use scrollview and auto layout is to add a view inside the scrollview and pin all its edges to scroll view and equal widths to superview, Pin all edges of scrollview to superView

  1. pin top, left , right and height of your label to your FAQ1 view.
  2. pin top of your text view to label and left right and bottom to your FAQ1 view.
  3. pin the height of your FAQ1 view, and left and right of your faq1 view to content view.
  4. Follow step 1 to 3 for all your faq views.
  5. Pin top of your faq1 view to top to top of content view
  6. Pin the top of the next faq view to bottom of the previous faq view.
  7. pin bottom of the last faq view to bottom of content view

when adding your faq1 view pin its top to top ,left and right to contentView's top left and right with necessary padding.

Hope this solves your problem