Skip to content

Commit

Permalink
Merge pull request 52inc#273 from diederich/feature/allow-adjusting-s…
Browse files Browse the repository at this point in the history
…hadow-offset

allow adjusting shadow offset
  • Loading branch information
ulmentflam authored Oct 9, 2018
2 parents 341476d + d2afb4f commit 1e32439
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions PulleyLib/PulleyViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,16 @@ open class PulleyViewController: UIViewController, PulleyDrawerViewControllerDel
}
}

/// The offset of the drawer shadow.
@IBInspectable public var shadowOffset = CGSize(width: 0.0, height: -3.0) {
didSet {
if self.isViewLoaded {
drawerShadowView.layer.shadowOffset = shadowOffset
self.view.setNeedsLayout()
}
}
}

/// The opaque color of the background dimming view.
@IBInspectable public var backgroundDimmingColor: UIColor = UIColor.black {
didSet {
Expand Down Expand Up @@ -662,6 +672,7 @@ open class PulleyViewController: UIViewController, PulleyDrawerViewControllerDel

drawerShadowView.layer.shadowOpacity = shadowOpacity
drawerShadowView.layer.shadowRadius = shadowRadius
drawerShadowView.layer.shadowOffset = shadowOffset
drawerShadowView.backgroundColor = UIColor.clear

drawerContentContainer.backgroundColor = UIColor.clear
Expand Down

0 comments on commit 1e32439

Please sign in to comment.