-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Description
I would like to stick it to the top ov the screen. Is it possible?
As you can see on the image it should be constrained to the top of the screen, but it is not. Why?
This is how i defined it in code:
private let imageView: UIImageView = {
let view = UIImageView()
view.contentMode = .scaleAspectFill
return view
}()
private lazy var scrollView: UIScrollView = {
let view = UIScrollView()
view.showsVerticalScrollIndicator = false
view.bounces = true
view.backgroundColor = .clear
view.parallaxHeader.view = imageView
view.parallaxHeader.mode = .centerFill
view.parallaxHeader.height = 400
view.parallaxHeader.minimumHeight = 100
return view
}()
addSubview(scrollView)
scrollView.snp.makeConstraints { maker in
maker.leading.trailing.top.equalToSuperview()
maker.bottom.equalTo(safeAreaLayoutGuide)
}
Metadata
Metadata
Assignees
Labels
No labels