How to align UIView to topLayoutGuide in SnapKit

How to align UIView to topLayoutGuide in SnapKit

Feb 20, 2018, 12:00 AM

Use topLayoutGuide.snp.bottom to align your UIView to the bottom of the navigation bar or the bottom of the status bar in Swift 3 while using the SnapKit pod.


view.snp.makeContraints { male -> Void in
    make.top.equalTo(topLayoutGuide.snp.bottom)
}

Use bottomLayoutGuide.snp.top to align your UIView to the top of the tab bar.