Skip to content

Commit

Permalink
Enable updating position
Browse files Browse the repository at this point in the history
  • Loading branch information
kennic committed May 18, 2020
1 parent a9d65ec commit b94a6e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions NKModalPresenter/NKModalController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,11 @@ public class NKModalController: NKModalContainerViewController {
}
}

public func updatePosition(_ position: NKModalPresentPosition, duration: TimeInterval? = nil, completion: (() -> Void)? = nil) {
targetPosition = position
updateLayout(duration: duration, completion: completion)
}

public func updateLayout(duration: TimeInterval? = nil, completion: (() -> Void)? = nil) {
contentSize = getContentSize()
layoutView(duration: duration, completion: completion)
Expand Down

0 comments on commit b94a6e6

Please sign in to comment.