Skip to content

Commit

Permalink
animaton type added to custom view
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Lloyd committed Nov 21, 2019
1 parent 9b14222 commit 5a72931
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Rye/Rye/RyeType+Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public struct Rye {

public enum ViewType {
case standard(configuration: RyeConfiguration?)
case custom(UIView)
case custom(UIView, animationType: AnimationType = .slideInOut)
}

public enum Configuration {
Expand Down
7 changes: 3 additions & 4 deletions Rye/Rye/RyeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ public class RyeViewController: UIViewController {
case .standard(let configuration):
animationDuration = configuration?[Rye.Configuration.Key.animationDuration] as? TimeInterval ?? 0.3
animationType = configuration?[Rye.Configuration.Key.animationType] as? Rye.AnimationType ?? .slideInOut
default:
case .custom(_, let animationType):
animationDuration = 0.3
animationType = .slideInOut
self.animationType = animationType
}

super.init(nibName: nil, bundle: nil)
Expand Down Expand Up @@ -161,8 +161,7 @@ public class RyeViewController: UIViewController {

addRyeView(ryeView)

case .custom(let ryeView):

case .custom(let ryeView, _):
addRyeView(ryeView)

}
Expand Down

0 comments on commit 5a72931

Please sign in to comment.