Last active
September 24, 2022 19:10
-
-
Save Anik0808/19d59bad8f0571ed4f87d65b65c9b81d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func setupView(){ | |
view.backgroundColor = .black | |
//setup the scrollView | |
view.addSubview(parentScrollView) | |
parentScrollView.fillSuperview() | |
parentScrollView.contentSize = CGSize(width: DeviceSize.width, | |
height: DeviceSize.height*2) | |
//setup the content view | |
parentScrollView.addSubview(contentView) | |
contentView.anchorView(top: parentScrollView.topAnchor, | |
left: parentScrollView.leftAnchor, | |
width: parentScrollView.contentSize.width, | |
height: parentScrollView.contentSize.height) | |
//setup the header view | |
contentView.addSubview(headerView) | |
headerView.anchorView(top: contentView.topAnchor, | |
left: contentView.leftAnchor, | |
right: contentView.rightAnchor, | |
height: 450) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment