mirror of https://github.com/SnapKit/SnapKit
Update deprecations to allow Xcode to auto-fixup. (#634)
This commit is contained in:
parent
892722a933
commit
441a1695ed
|
@ -215,12 +215,12 @@ public final class Constraint {
|
||||||
|
|
||||||
// MARK: Public
|
// MARK: Public
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use activate().")
|
@available(*, deprecated, renamed:"activate()")
|
||||||
public func install() {
|
public func install() {
|
||||||
self.activate()
|
self.activate()
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use deactivate().")
|
@available(*, deprecated, renamed:"deactivate()")
|
||||||
public func uninstall() {
|
public func uninstall() {
|
||||||
self.deactivate()
|
self.deactivate()
|
||||||
}
|
}
|
||||||
|
@ -266,13 +266,13 @@ public final class Constraint {
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use update(offset: ConstraintOffsetTarget) instead.")
|
@available(*, deprecated, renamed:"update(offset:)")
|
||||||
public func updateOffset(amount: ConstraintOffsetTarget) -> Void { self.update(offset: amount) }
|
public func updateOffset(amount: ConstraintOffsetTarget) -> Void { self.update(offset: amount) }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use update(inset: ConstraintInsetTarget) instead.")
|
@available(*, deprecated, renamed:"update(inset:)")
|
||||||
public func updateInsets(amount: ConstraintInsetTarget) -> Void { self.update(inset: amount) }
|
public func updateInsets(amount: ConstraintInsetTarget) -> Void { self.update(inset: amount) }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use update(priority: ConstraintPriorityTarget) instead.")
|
@available(*, deprecated, renamed:"update(priority:)")
|
||||||
public func updatePriority(amount: ConstraintPriorityTarget) -> Void { self.update(priority: amount) }
|
public func updatePriority(amount: ConstraintPriorityTarget) -> Void { self.update(priority: amount) }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use update(priority: ConstraintPriorityTarget) instead.")
|
@available(*, deprecated, message:"Use update(priority: ConstraintPriorityTarget) instead.")
|
||||||
|
|
|
@ -134,8 +134,7 @@ public protocol ConstraintAttributesDSL : ConstraintBasicAttributesDSL {
|
||||||
extension ConstraintAttributesDSL {
|
extension ConstraintAttributesDSL {
|
||||||
|
|
||||||
// MARK: Baselines
|
// MARK: Baselines
|
||||||
|
@available(*, deprecated, renamed:"lastBaseline")
|
||||||
@available(*, deprecated, message:"Use .lastBaseline instead")
|
|
||||||
public var baseline: ConstraintItem {
|
public var baseline: ConstraintItem {
|
||||||
return ConstraintItem(target: self.target, attributes: ConstraintAttributes.lastBaseline)
|
return ConstraintItem(target: self.target, attributes: ConstraintAttributes.lastBaseline)
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class ConstraintMaker {
|
||||||
return self.makeExtendableWithAttributes(.centerY)
|
return self.makeExtendableWithAttributes(.centerY)
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use lastBaseline instead")
|
@available(*, deprecated, renamed:"lastBaseline")
|
||||||
public var baseline: ConstraintMakerExtendable {
|
public var baseline: ConstraintMakerExtendable {
|
||||||
return self.makeExtendableWithAttributes(.lastBaseline)
|
return self.makeExtendableWithAttributes(.lastBaseline)
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class ConstraintMakerExtendable: ConstraintMakerRelatable {
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use lastBaseline instead")
|
@available(*, deprecated, renamed:"lastBaseline")
|
||||||
public var baseline: ConstraintMakerExtendable {
|
public var baseline: ConstraintMakerExtendable {
|
||||||
self.description.attributes += .lastBaseline
|
self.description.attributes += .lastBaseline
|
||||||
return self
|
return self
|
||||||
|
|
|
@ -30,117 +30,117 @@
|
||||||
|
|
||||||
public extension ConstraintView {
|
public extension ConstraintView {
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.left")
|
||||||
var snp_left: ConstraintItem { return self.snp.left }
|
var snp_left: ConstraintItem { return self.snp.left }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.top")
|
||||||
var snp_top: ConstraintItem { return self.snp.top }
|
var snp_top: ConstraintItem { return self.snp.top }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.right")
|
||||||
var snp_right: ConstraintItem { return self.snp.right }
|
var snp_right: ConstraintItem { return self.snp.right }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.bottom")
|
||||||
var snp_bottom: ConstraintItem { return self.snp.bottom }
|
var snp_bottom: ConstraintItem { return self.snp.bottom }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.leading")
|
||||||
var snp_leading: ConstraintItem { return self.snp.leading }
|
var snp_leading: ConstraintItem { return self.snp.leading }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.trailing")
|
||||||
var snp_trailing: ConstraintItem { return self.snp.trailing }
|
var snp_trailing: ConstraintItem { return self.snp.trailing }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.width")
|
||||||
var snp_width: ConstraintItem { return self.snp.width }
|
var snp_width: ConstraintItem { return self.snp.width }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.height")
|
||||||
var snp_height: ConstraintItem { return self.snp.height }
|
var snp_height: ConstraintItem { return self.snp.height }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.centerX")
|
||||||
var snp_centerX: ConstraintItem { return self.snp.centerX }
|
var snp_centerX: ConstraintItem { return self.snp.centerX }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.centerY")
|
||||||
var snp_centerY: ConstraintItem { return self.snp.centerY }
|
var snp_centerY: ConstraintItem { return self.snp.centerY }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.baseline")
|
||||||
var snp_baseline: ConstraintItem { return self.snp.baseline }
|
var snp_baseline: ConstraintItem { return self.snp.baseline }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.lastBaseline")
|
||||||
@available(iOS 8.0, OSX 10.11, *)
|
@available(iOS 8.0, OSX 10.11, *)
|
||||||
var snp_lastBaseline: ConstraintItem { return self.snp.lastBaseline }
|
var snp_lastBaseline: ConstraintItem { return self.snp.lastBaseline }
|
||||||
|
|
||||||
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
|
@available(iOS, deprecated, renamed:"snp.firstBaseline")
|
||||||
@available(iOS 8.0, OSX 10.11, *)
|
@available(iOS 8.0, OSX 10.11, *)
|
||||||
var snp_firstBaseline: ConstraintItem { return self.snp.firstBaseline }
|
var snp_firstBaseline: ConstraintItem { return self.snp.firstBaseline }
|
||||||
|
|
||||||
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
|
@available(iOS, deprecated, renamed:"snp.leftMargin")
|
||||||
@available(iOS 8.0, *)
|
@available(iOS 8.0, *)
|
||||||
var snp_leftMargin: ConstraintItem { return self.snp.leftMargin }
|
var snp_leftMargin: ConstraintItem { return self.snp.leftMargin }
|
||||||
|
|
||||||
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
|
@available(iOS, deprecated, renamed:"snp.topMargin")
|
||||||
@available(iOS 8.0, *)
|
@available(iOS 8.0, *)
|
||||||
var snp_topMargin: ConstraintItem { return self.snp.topMargin }
|
var snp_topMargin: ConstraintItem { return self.snp.topMargin }
|
||||||
|
|
||||||
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
|
@available(iOS, deprecated, renamed:"snp.rightMargin")
|
||||||
@available(iOS 8.0, *)
|
@available(iOS 8.0, *)
|
||||||
var snp_rightMargin: ConstraintItem { return self.snp.rightMargin }
|
var snp_rightMargin: ConstraintItem { return self.snp.rightMargin }
|
||||||
|
|
||||||
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
|
@available(iOS, deprecated, renamed:"snp.bottomMargin")
|
||||||
@available(iOS 8.0, *)
|
@available(iOS 8.0, *)
|
||||||
var snp_bottomMargin: ConstraintItem { return self.snp.bottomMargin }
|
var snp_bottomMargin: ConstraintItem { return self.snp.bottomMargin }
|
||||||
|
|
||||||
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
|
@available(iOS, deprecated, renamed:"snp.leadingMargin")
|
||||||
@available(iOS 8.0, *)
|
@available(iOS 8.0, *)
|
||||||
var snp_leadingMargin: ConstraintItem { return self.snp.leadingMargin }
|
var snp_leadingMargin: ConstraintItem { return self.snp.leadingMargin }
|
||||||
|
|
||||||
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
|
@available(iOS, deprecated, renamed:"snp.trailingMargin")
|
||||||
@available(iOS 8.0, *)
|
@available(iOS 8.0, *)
|
||||||
var snp_trailingMargin: ConstraintItem { return self.snp.trailingMargin }
|
var snp_trailingMargin: ConstraintItem { return self.snp.trailingMargin }
|
||||||
|
|
||||||
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
|
@available(iOS, deprecated, renamed:"snp.centerXWithinMargins")
|
||||||
@available(iOS 8.0, *)
|
@available(iOS 8.0, *)
|
||||||
var snp_centerXWithinMargins: ConstraintItem { return self.snp.centerXWithinMargins }
|
var snp_centerXWithinMargins: ConstraintItem { return self.snp.centerXWithinMargins }
|
||||||
|
|
||||||
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
|
@available(iOS, deprecated, renamed:"snp.centerYWithinMargins")
|
||||||
@available(iOS 8.0, *)
|
@available(iOS 8.0, *)
|
||||||
var snp_centerYWithinMargins: ConstraintItem { return self.snp.centerYWithinMargins }
|
var snp_centerYWithinMargins: ConstraintItem { return self.snp.centerYWithinMargins }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.edges")
|
||||||
var snp_edges: ConstraintItem { return self.snp.edges }
|
var snp_edges: ConstraintItem { return self.snp.edges }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.size")
|
||||||
var snp_size: ConstraintItem { return self.snp.size }
|
var snp_size: ConstraintItem { return self.snp.size }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.center")
|
||||||
var snp_center: ConstraintItem { return self.snp.center }
|
var snp_center: ConstraintItem { return self.snp.center }
|
||||||
|
|
||||||
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
|
@available(iOS, deprecated, renamed:"snp.margins")
|
||||||
@available(iOS 8.0, *)
|
@available(iOS 8.0, *)
|
||||||
var snp_margins: ConstraintItem { return self.snp.margins }
|
var snp_margins: ConstraintItem { return self.snp.margins }
|
||||||
|
|
||||||
@available(iOS, deprecated, message:"Use newer snp.* syntax.")
|
@available(iOS, deprecated, renamed:"snp.centerWithinMargins")
|
||||||
@available(iOS 8.0, *)
|
@available(iOS 8.0, *)
|
||||||
var snp_centerWithinMargins: ConstraintItem { return self.snp.centerWithinMargins }
|
var snp_centerWithinMargins: ConstraintItem { return self.snp.centerWithinMargins }
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.prepareConstraints(_:)")
|
||||||
func snp_prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] {
|
func snp_prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] {
|
||||||
return self.snp.prepareConstraints(closure)
|
return self.snp.prepareConstraints(closure)
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.makeConstraints(_:)")
|
||||||
func snp_makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
|
func snp_makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
|
||||||
self.snp.makeConstraints(closure)
|
self.snp.makeConstraints(closure)
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.remakeConstraints(_:)")
|
||||||
func snp_remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
|
func snp_remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
|
||||||
self.snp.remakeConstraints(closure)
|
self.snp.remakeConstraints(closure)
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.updateConstraints(_:)")
|
||||||
func snp_updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
|
func snp_updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
|
||||||
self.snp.updateConstraints(closure)
|
self.snp.updateConstraints(closure)
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(*, deprecated, message:"Use newer snp.* syntax.")
|
@available(*, deprecated, renamed:"snp.removeConstraints()")
|
||||||
func snp_removeConstraints() {
|
func snp_removeConstraints() {
|
||||||
self.snp.removeConstraints()
|
self.snp.removeConstraints()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue