Skip to content

Commit

Permalink
Merge pull request #25 from nodes-ios/feature/allowAnimationTypeForCu…
Browse files Browse the repository at this point in the history
…stomViews

animaton type added to custom view
  • Loading branch information
Jakob Mygind authored Nov 21, 2019
2 parents 9b14222 + 5a72931 commit 936b65e
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 936b65e

Please sign in to comment.