//
//  GMBaseUtil.swift
//  Pods
//
//  Created by wangyang on 2016/10/21.
//
//

import Foundation
import SnapKit

public extension UIView {
    public var snp_safeBottom: ConstraintItem {
        if #available(iOS 11.0, *) {
            return safeAreaLayoutGuide.snp.bottom
        } else {
            return snp.bottom
        }
    }
}

public extension ConstraintMaker {
    public func gm_bottom(to superView: UIView, height: CGFloat) {
        top.equalTo(superView.snp_safeBottom).offset(-height)
        bottom.equalTo(0)
    }
}
