Skip to content

Commit 8472e4e

Browse files
committed
Removed var alertStyle
1 parent b5fd299 commit 8472e4e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Library/PMAlertController.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ import UIKit
3636
@IBOutlet weak open var alertActionStackViewTopConstraint: NSLayoutConstraint!
3737
@IBOutlet weak open var alertActionStackViewBottomConstraint: NSLayoutConstraint!
3838

39-
open var alertStyle: PMAlertControllerStyle!
40-
4139
open var ALERT_STACK_VIEW_HEIGHT : CGFloat = UIScreen.main.bounds.height < 568.0 ? 40 : 62 //if iphone 4 the stack_view_height is 40, else 62
4240
var animator : UIDynamicAnimator?
4341

@@ -86,8 +84,7 @@ import UIKit
8684
}
8785

8886
//if alert width = 270, else width = screen width - 36
89-
alertStyle = style
90-
alertStyle == .alert ? (alertViewWidthConstraint.constant = 270) : (alertViewWidthConstraint.constant = UIScreen.main.bounds.width - 36)
87+
alertViewWidthConstraint.constant = (style == .alert) ? 270 : UIScreen.main.bounds.width - 36
9188

9289
//Gesture recognizer for background dismiss with background touch
9390
let tapRecognizer: UITapGestureRecognizer = UITapGestureRecognizer.init(target: self, action: #selector(dismissAlertControllerFromBackgroundTap))

0 commit comments

Comments
 (0)