Skip to content

Commit

Permalink
Rename back to bind to avoid breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinesh Kumar committed Feb 4, 2021
1 parent bbc14ce commit 734ebe6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Source/Infra/EKContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class EKContentView: UIView {

// Setup keyboard constraints
switch attributes.positionConstraints.keyboardRelation {
case .bindWhenResponder(offset: let offset):
case .bind(offset: let offset):
fallthrough
case .bindAlways(offset: let offset):
if let screenEdgeResistance = offset.screenEdgeResistance {
Expand Down Expand Up @@ -600,7 +600,7 @@ extension EKContentView {
switch attributes.positionConstraints.keyboardRelation {
case .unbind: return false
case .bindAlways(offset: _): return true
case .bindWhenResponder(offset: _): return containsFirstResponder
case .bind(offset: _): return containsFirstResponder
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public extension EKAttributes {
Additionally, the top edge of the screen can have a resistance offset which the entry isn't able to cross.
The resistance is mostly used when the device orientation changes and the entry's frame crosses the screen bounds.
Current isn't supported with center entry position.*/
case bindWhenResponder(offset: Offset)
case bind(offset: Offset)

/** Bind the entry's bottom to the keyboard's top with an offset.
Additionally, the top edge of the screen can have a resistance offset which the entry isn't able to cross.
Expand All @@ -125,7 +125,7 @@ public extension EKAttributes {
/** Returns true if the entry is bound to the keyboard */
public var isBound: Bool {
switch self {
case .bindWhenResponder(offset: _), .bindAlways(offset: _):
case .bind(offset: _), .bindAlways(offset: _):
return true
case .unbind:
return false
Expand All @@ -136,7 +136,7 @@ public extension EKAttributes {
switch self {
case .bindAlways(offset: let offset):
return offset
case .bindWhenResponder(offset: let offset):
case .bind(offset: let offset):
return offset
default: return nil
}
Expand Down

0 comments on commit 734ebe6

Please sign in to comment.