File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
AdvancedActionSheet.xcodeproj
project.xcworkspace/xcuserdata/alisamaiee.xcuserdatad
xcuserdata/alisamaiee.xcuserdatad/xcschemes
AdvancedActionSheet/AdvancedActionSheet Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 77 <key >AdvancedActionSheet.xcscheme_^#shared#^_ </key >
88 <dict >
99 <key >orderHint </key >
10- <integer >1 </integer >
10+ <integer >0 </integer >
1111 </dict >
1212 <key >AdvancedActionSheetExamples.xcscheme_^#shared#^_ </key >
1313 <dict >
1414 <key >orderHint </key >
15- <integer >0 </integer >
15+ <integer >1 </integer >
1616 </dict >
1717 </dict >
1818</dict >
Original file line number Diff line number Diff line change @@ -145,6 +145,11 @@ public class AdvancedActionSheet: UIViewController {
145145 self . view. addSubview ( cancelLabel)
146146 self . view. addSubview ( contentTableView)
147147
148+ var bottomSpaceToCancelButton : CGFloat = - 12
149+ if #available( iOS 11 . 0 , * ) {
150+ bottomSpaceToCancelButton = ( UIApplication . shared. windows. first? . safeAreaInsets. bottom ?? 12 ) * - 1
151+ }
152+
148153 self . mainViewAnchorConstraint = mainView. topAnchor. constraint ( equalTo: self . view. bottomAnchor, constant: 0 )
149154 mainViewAnchorConstraint. isActive = true
150155 mainView. leadingAnchor. constraint ( equalTo: self . view. leadingAnchor, constant: 10 ) . isActive = true
@@ -153,7 +158,7 @@ public class AdvancedActionSheet: UIViewController {
153158
154159 cancelView. trailingAnchor. constraint ( equalTo: self . mainView. trailingAnchor, constant: 0 ) . isActive = true
155160 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
157162 cancelView. heightAnchor. constraint ( equalToConstant: 57 ) . isActive = true
158163
159164 cancelLabel. trailingAnchor. constraint ( equalTo: self . cancelView. trailingAnchor, constant: - 6 ) . isActive = true
You can’t perform that action at this time.
0 commit comments