1

Where can I find cleaner example and understanding of following methods. How they work, who call them and when ? and what is call stack.

func systemLayoutSizeFitting(_ targetSize: CGSize, withHorizontalFittingPriority horizontalFittingPriority: UILayoutPriority, verticalFittingPriority: UILayoutPriority) -> CGSize

func systemLayoutSizeFitting(_ targetSize: CGSize) -> CGSize

func setNeedsLayout()
func layoutIfNeeded()
func layoutSubviews()

func setNeedsUpdateConstraints()
func updateConstraintsIfNeeded()
func updateConstraints()

var intrinsicContentSize
func invalidateIntrinsicContentSize()

I have tried to understand documentation on https://developer.apple.com/documentation/, but could not understand all cases. Can some one provide me example or well written documentation?

Nikunj Acharya
  • 767
  • 8
  • 19
  • Constraints and autolayout go together; autolayout uses constraints to perform layout. You cannot have autolayout without constraints and if you have constraints then you are using autolayout. – Paulw11 Aug 24 '18 at 11:59
  • That I know, but I need above methods if I render my view programatically. How these method communicates with iOS that is my major question. – Nikunj Acharya Aug 24 '18 at 12:13

0 Answers0