2021-01-28 09:10:30 +01:00
|
|
|
//
|
|
|
|
// NSLayoutConstraint.swift
|
|
|
|
// Mastodon
|
|
|
|
//
|
|
|
|
// Created by sxiaojian on 2021/1/28.
|
|
|
|
//
|
|
|
|
|
|
|
|
import UIKit
|
|
|
|
|
|
|
|
extension NSLayoutConstraint {
|
2021-07-19 11:12:45 +02:00
|
|
|
public func priority(_ priority: UILayoutPriority) -> Self {
|
2021-01-28 09:10:30 +01:00
|
|
|
self.priority = priority
|
|
|
|
return self
|
|
|
|
}
|
2021-04-19 11:50:58 +02:00
|
|
|
|
2021-07-19 11:12:45 +02:00
|
|
|
public func identifier(_ identifier: String?) -> Self {
|
2021-04-19 11:50:58 +02:00
|
|
|
self.identifier = identifier
|
|
|
|
return self
|
|
|
|
}
|
2022-12-03 04:55:16 +01:00
|
|
|
|
|
|
|
@discardableResult
|
|
|
|
public func activate() -> Self {
|
|
|
|
self.isActive = true
|
|
|
|
return self
|
|
|
|
}
|
|
|
|
|
|
|
|
@discardableResult
|
|
|
|
public func deactivate() -> Self {
|
|
|
|
self.isActive = false
|
|
|
|
return self
|
|
|
|
}
|
2021-01-28 09:10:30 +01:00
|
|
|
}
|