Skip to content

Commit bea714b

Browse files
committed
Added backgroundAlpha
1 parent 5bbe01d commit bea714b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

AZDialogView.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "AZDialogView"
3-
s.version = "1.0.1"
3+
s.version = "1.0.2"
44
s.summary = "A highly customizable alert dialog controller that mimics Snapchat's alert dialog."
55
s.homepage = "https://github.com/Minitour/AZDialogViewController"
66
s.license = "MIT"

Sources/AZDialogViewController.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ open class AZDialogViewController: UIViewController{
7373

7474
open var dismissDirection: AZDialogDismissDirection = .both
7575

76+
open var backgroundAlpha: Float = 0.2
77+
7678
open private (set) var spacing: CGFloat = 0
7779

7880
open private (set) var stackSpacing: CGFloat = 0
@@ -352,7 +354,7 @@ open class AZDialogViewController: UIViewController{
352354
baseView.isHidden = false
353355
UIView.animate(withDuration: 0.2, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 6.0, options: [], animations: { () -> Void in
354356
self.baseView.center = (self.baseView.superview?.center)!
355-
let backgroundColor = UIColor(colorLiteralRed: 0, green: 0, blue: 0, alpha: 0.2)
357+
let backgroundColor = UIColor(colorLiteralRed: 0, green: 0, blue: 0, alpha: self.backgroundAlpha)
356358
self.view.backgroundColor = backgroundColor
357359
}) { (complete) -> Void in
358360
}

0 commit comments

Comments
 (0)