Commit 12b75d04 by Daniel Dahan

development: removed fade from setBottomSheetHeight method

parent 0ebe904f
...@@ -457,14 +457,13 @@ open class BottomSheetController: RootController { ...@@ -457,14 +457,13 @@ open class BottomSheetController: RootController {
if isHidden { if isHidden {
UIView.animate(withDuration: duration, UIView.animate(withDuration: duration,
animations: { [weak self, v = bottomSheet] in animations: { [weak self, v = bottomSheet, h = bottomSheetHeight] in
guard let s = self else { guard let s = self else {
return return
} }
v.bounds.size.height = height v.bounds.size.height = height
v.position.y = s.view.bounds.height - height / 2 v.position.y = s.view.bounds.height - h / 2
// s.rootViewController.view.alpha = 1
}) { [weak self, v = bottomSheet] _ in }) { [weak self, v = bottomSheet] _ in
guard let s = self else { guard let s = self else {
return return
...@@ -483,14 +482,13 @@ open class BottomSheetController: RootController { ...@@ -483,14 +482,13 @@ open class BottomSheetController: RootController {
v.bounds.size.height = h v.bounds.size.height = h
v.position.y = s.view.bounds.height - h / 2 v.position.y = s.view.bounds.height - h / 2
// s.rootViewController.view.alpha = 0.5
}) { [weak self, v = bottomSheet] _ in }) { [weak self, v = bottomSheet] _ in
guard let s = self else { guard let s = self else {
return return
} }
v.isShadowPathAutoSizing = true v.isShadowPathAutoSizing = true
// s.layoutSubviews() s.layoutSubviews()
s.showView(container: v) s.showView(container: v)
} }
} }
...@@ -500,13 +498,11 @@ open class BottomSheetController: RootController { ...@@ -500,13 +498,11 @@ open class BottomSheetController: RootController {
if isHidden { if isHidden {
hideView(container: bottomSheet) hideView(container: bottomSheet)
bottomSheet.position.y = view.bounds.height - bottomSheetHeight / 2 bottomSheet.position.y = view.bounds.height - bottomSheetHeight / 2
rootViewController.view.alpha = 1
} else { } else {
bottomSheet.isShadowPathAutoSizing = false bottomSheet.isShadowPathAutoSizing = false
showView(container: bottomSheet) showView(container: bottomSheet)
bottomSheet.position.y = height / 2 bottomSheet.position.y = view.bounds.height - bottomSheetHeight / 2
rootViewController.view.alpha = 0.5
bottomSheet.isShadowPathAutoSizing = true bottomSheet.isShadowPathAutoSizing = true
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment