You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While checking the demo, if the value is dynamically changed to false as ʻisThumbVisible, it was confirmed that the layout of MainMenuViewController` behaves strangely.
Below is the full code I tested.
import UIKit
import Rideau
finalclassViewController:UIViewController{@IBOutlet weak varbox1:UIView!@IBOutlet weak varbox2:UIView!privateletrideauView=RideauView(frame:.zero){(config)in
config.topMarginOption =.fromSafeArea(0)
config.snapPoints =[.pointsFromBottom(150),.pointsFromBottom(250),.pointsFromBottom(700),.full]}letcontainer=RideauMaskedCornerRoundedViewController()
lazy vardefaultCornerRadius= container.contentView.cornerRadius
overridefunc viewDidLoad(){
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
view.addSubview(rideauView)
rideauView.frame = view.bounds
rideauView.autoresizingMask =[.flexibleWidth,.flexibleHeight]letcontroller=UIStoryboard.init(name:"Main", bundle:nil).instantiateViewController(withIdentifier:"MainMenuViewController")as!MainMenuViewController
container.isThumbVisible =true
container.setBodyViewController(controller)
container.willMove(toParent:self)addChild(container)
rideauView.containerView.set(bodyView: container.view, resizingOption:.resizeToVisibleArea)
rideauView.isTrackingKeyboard =false
rideauView.delegate =self}overridefunc viewDidAppear(_ animated:Bool){
super.viewDidAppear(animated)print("viewDidAppear")}@IBActionfunc didTapChangeButton(_ sender:Any){self.box1.backgroundColor =.blue
self.box2.backgroundColor =.blue
}}extensionViewController:RideauViewDelegate{func rideauView(_ rideauView:RideauView, animatorsAlongsideMovingIn range:ResolvedSnapPointRange)->[UIViewPropertyAnimator]{switch(range.start.source, range.end.source){case(.fraction(1),.fraction(0.7)):letanimator1=UIViewPropertyAnimator(duration:0.3, curve:.easeInOut){self.box1.alpha =0.3}letanimator2=UIViewPropertyAnimator(duration:0.3, curve:.easeInOut){
rideauView.backgroundColor =UIColor(white:0, alpha:0.3)}return[animator1, animator2]case(.fraction(0.7),.autoPointsFromBottom):letanimator=UIViewPropertyAnimator(duration:0.3, curve:.easeInOut){self.box2.alpha =0.3}return[animator]default:return[]}}func rideauView(_ rideauView:RideauView, willMoveTo snapPoint:RideauSnapPoint){switch snapPoint {case.full:
container.contentView.cornerRadius =0
container.isThumbVisible =false // This case has layout bug
default:
container.contentView.cornerRadius = defaultCornerRadius
container.isThumbVisible =true}}}
The text was updated successfully, but these errors were encountered:
While checking the demo, if the value is dynamically changed to false as ʻisThumbVisible
, it was confirmed that the layout of
MainMenuViewController` behaves strangely.Below is the full code I tested.
The text was updated successfully, but these errors were encountered: