Skip to content

Commit 1ae2350

Browse files
committed
Add available attribute
1 parent f935b1d commit 1ae2350

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

SPPermission.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 = "SPPermission"
3-
s.version = "2.3.6"
3+
s.version = "2.3.8"
44
s.summary = "Simple request permissions with dialog alert"
55
s.homepage = "https://github.com/IvanVorobei/RequestPermission"
66
s.source = { :git => "https://github.com/IvanVorobei/RequestPermission.git", :tag => s.version }

Source/Permission/Dialog/SPPermissionDialogController.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ public class SPPermissionDialogController: UIViewController {
233233
self.bottomLabel.sizeToFit()
234234
self.bottomLabel.frame = CGRect.init(origin: self.bottomLabel.frame.origin, size: CGSize.init(width: bottomLabelWidth, height: self.bottomLabel.frame.height))
235235
self.bottomLabel.center.x = size.width / 2
236-
self.bottomLabel.frame.origin.y = size.height - self.view.safeAreaInsets.bottom - 30 - self.bottomLabel.frame.height
236+
if #available(iOS 11.0, *) {
237+
self.bottomLabel.frame.origin.y = size.height - self.view.safeAreaInsets.bottom - 30 - self.bottomLabel.frame.height
238+
} else {
239+
self.bottomLabel.frame.origin.y = size.height - 30 - self.bottomLabel.frame.height
240+
}
237241
SPPermissionStyle.Shadow.setShadowOffsetForLabel(self.bottomLabel, blurRadius: 3, widthOffset: 0, heightOffset: 0, opacity: 0.18)
238242

239243
let bottomLabelAlpha: CGFloat = SPPermissionStyle.Orientation.isPortrait ? 1 : 0

0 commit comments

Comments
 (0)