Skip to content

Commit ec28949

Browse files
author
vsalas
committed
renaming
1 parent 02daab7 commit ec28949

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

Demos/FluentUIDemo_iOS/FluentUI.Demo/Demos/BottomSheetDemoController.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ class BottomSheetDemoController: DemoController {
103103
bottomSheetViewController?.preferredWidth = sender.isOn ? 400 : 0
104104
}
105105

106-
@objc private func toggleGrabberOverlayContent(_ sender: BooleanCell) {
107-
bottomSheetViewController?.shouldGrabberOverlayContent = sender.isOn
106+
@objc private func toggleResizingViewOverlayContent(_ sender: BooleanCell) {
107+
bottomSheetViewController?.shouldResizingViewOverlayContent = sender.isOn
108108
}
109109

110110
@objc private func showTransientSheet() {
@@ -280,10 +280,10 @@ class BottomSheetDemoController: DemoController {
280280
type: .boolean,
281281
action: #selector(togglePreferredWidth),
282282
isOn: bottomSheetViewController?.preferredWidth == 400),
283-
DemoItem(title: "Should grabber overlay content",
283+
DemoItem(title: "Should resizing view overlay content",
284284
type: .boolean,
285-
action: #selector(toggleGrabberOverlayContent),
286-
isOn: bottomSheetViewController?.shouldGrabberOverlayContent ?? false)
285+
action: #selector(toggleResizingViewOverlayContent),
286+
isOn: bottomSheetViewController?.shouldResizingViewOverlayContent ?? false)
287287
],
288288
[
289289
DemoItem(title: "Show transient sheet", type: .action, action: #selector(showTransientSheet))

Sources/FluentUI_iOS/Components/BottomSheet/BottomSheetController.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,9 @@ public class BottomSheetController: UIViewController, Shadowable, TokenizedContr
299299
/// Indicates whether the `resizingHandleView` should overlay the `headerContentHeight` or `expandedContentView`
300300
///
301301
/// The default value is false.
302-
@objc open var shouldGrabberOverlayContent: Bool = false {
302+
@objc open var shouldResizingViewOverlayContent: Bool = false {
303303
didSet {
304-
guard shouldGrabberOverlayContent != oldValue && isViewLoaded else {
304+
guard shouldResizingViewOverlayContent != oldValue && isViewLoaded else {
305305
return
306306
}
307307
updateResizingHandleConstraints()
@@ -617,11 +617,11 @@ public class BottomSheetController: UIViewController, Shadowable, TokenizedContr
617617
}
618618

619619
private func updateResizingHandleConstraints() {
620-
if let resizingHandleViewConstraints {
621-
if shouldGrabberOverlayContent {
622-
NSLayoutConstraint.activate([resizingHandleViewConstraints])
620+
if let resizingHandleContentOverlapConstraints {
621+
if shouldResizingViewOverlayContent {
622+
NSLayoutConstraint.activate([resizingHandleContentOverlapConstraints])
623623
} else {
624-
NSLayoutConstraint.deactivate([resizingHandleViewConstraints])
624+
NSLayoutConstraint.deactivate([resizingHandleContentOverlapConstraints])
625625
}
626626
}
627627
}
@@ -698,7 +698,6 @@ public class BottomSheetController: UIViewController, Shadowable, TokenizedContr
698698
stackView.spacing = 0.0
699699
stackView.axis = .vertical
700700
stackView.translatesAutoresizingMaskIntoConstraints = false
701-
stackView.bringSubviewToFront(resizingHandleView)
702701

703702
// Some types of content (like navigation controllers) can mess up the VO order.
704703
// Explicitly specifying a11y elements helps prevents this.
@@ -721,10 +720,11 @@ public class BottomSheetController: UIViewController, Shadowable, TokenizedContr
721720
])
722721

723722
if let headerContentView {
724-
resizingHandleViewConstraints = headerContentView.topAnchor.constraint(equalTo: resizingHandleView.bottomAnchor)
723+
resizingHandleContentOverlapConstraints = headerContentView.topAnchor.constraint(equalTo: resizingHandleView.bottomAnchor, constant: -currentResizingHandleHeight)
725724
} else {
726-
resizingHandleViewConstraints = expandedContentView.topAnchor.constraint(equalTo: resizingHandleView.bottomAnchor)
725+
resizingHandleContentOverlapConstraints = expandedContentView.topAnchor.constraint(equalTo: resizingHandleView.bottomAnchor, constant: -currentResizingHandleHeight)
727726
}
727+
stackView.bringSubviewToFront(resizingHandleView)
728728
updateResizingHandleConstraints()
729729

730730
return makeBottomSheetByEmbedding(contentView: bottomSheetContentView)
@@ -1369,7 +1369,7 @@ public class BottomSheetController: UIViewController, Shadowable, TokenizedContr
13691369

13701370
private var headerContentViewHeightConstraint: NSLayoutConstraint?
13711371

1372-
private var resizingHandleViewConstraints: NSLayoutConstraint?
1372+
private var resizingHandleContentOverlapConstraints: NSLayoutConstraint?
13731373

13741374
private var currentStateChangeAnimator: UIViewPropertyAnimator?
13751375

0 commit comments

Comments
 (0)