File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
AdvancedActionSheet/AdvancedActionSheet
AdvancedActionSheet.xcodeproj
project.xcworkspace/xcuserdata/alisamaiee.xcuserdatad
xcuserdata/alisamaiee.xcuserdatad/xcschemes Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 7
7
<key >AdvancedActionSheet.xcscheme_^#shared#^_ </key >
8
8
<dict >
9
9
<key >orderHint </key >
10
- <integer >1 </integer >
10
+ <integer >0 </integer >
11
11
</dict >
12
12
<key >AdvancedActionSheetExamples.xcscheme_^#shared#^_ </key >
13
13
<dict >
14
14
<key >orderHint </key >
15
- <integer >0 </integer >
15
+ <integer >1 </integer >
16
16
</dict >
17
17
</dict >
18
18
</dict >
Original file line number Diff line number Diff line change @@ -145,6 +145,11 @@ public class AdvancedActionSheet: UIViewController {
145
145
self . view. addSubview ( cancelLabel)
146
146
self . view. addSubview ( contentTableView)
147
147
148
+ var bottomSpaceToCancelButton : CGFloat = - 12
149
+ if #available( iOS 11 . 0 , * ) {
150
+ bottomSpaceToCancelButton = ( UIApplication . shared. windows. first? . safeAreaInsets. bottom ?? 12 ) * - 1
151
+ }
152
+
148
153
self . mainViewAnchorConstraint = mainView. topAnchor. constraint ( equalTo: self . view. bottomAnchor, constant: 0 )
149
154
mainViewAnchorConstraint. isActive = true
150
155
mainView. leadingAnchor. constraint ( equalTo: self . view. leadingAnchor, constant: 10 ) . isActive = true
@@ -153,7 +158,7 @@ public class AdvancedActionSheet: UIViewController {
153
158
154
159
cancelView. trailingAnchor. constraint ( equalTo: self . mainView. trailingAnchor, constant: 0 ) . isActive = true
155
160
cancelView. leadingAnchor. constraint ( equalTo: self . mainView. leadingAnchor, constant: 0 ) . isActive = true
156
- cancelView. bottomAnchor. constraint ( equalTo: self . mainView. bottomAnchor, constant: - 11 ) . isActive = true
161
+ cancelView. bottomAnchor. constraint ( equalTo: self . mainView. bottomAnchor, constant: bottomSpaceToCancelButton ) . isActive = true
157
162
cancelView. heightAnchor. constraint ( equalToConstant: 57 ) . isActive = true
158
163
159
164
cancelLabel. trailingAnchor. constraint ( equalTo: self . cancelView. trailingAnchor, constant: - 6 ) . isActive = true
You can’t perform that action at this time.
0 commit comments