Andrii Yanechko
UIDatePicker
val controller = LocalUIViewController.current val controllerView = controller.view val screenWidth = UIScreen.mainScreen.bounds.useContents { size.width }.toDouble() val screenHeight = UIScreen.mainScreen.bounds.useContents { size.height }.toDouble() UIDatePicker( frame = CGRectMake( x = 0.0, y = screenHeight - datePickerHeight, width = screenWidth, height = datePickerHeight )
translatesAutoresizingMaskIntoConstraints = false controllerView.addSubview(this) NSLayoutConstraint.activateConstraints( listOf( this.leftAnchor.constraintEqualToAnchor(controllerView.leftAnchor), this.rightAnchor.constraintEqualToAnchor(controllerView.rightAnchor), this.bottomAnchor.constraintEqualToAnchor(controllerView.bottomAnchor), ) )
Mofe Ejegi
A modern programming language that makes developers happier.