Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIStackView #49

Open
chaneeii opened this issue Oct 17, 2022 · 3 comments
Open

UIStackView #49

chaneeii opened this issue Oct 17, 2022 · 3 comments
Labels
UIKit UIKit

Comments

@chaneeii
Copy link
Owner

chaneeii commented Oct 17, 2022

@chaneeii
Copy link
Owner Author

chaneeii commented Oct 17, 2022

lazy var stackView: UIStackView = {
		//arrangedSubviews <- 안에 있는 값은 클래스에서 불러온값 
        let stackV = UIStackView(arrangedSubviews: [stackviewF.view1, stackviewF.view2, stackviewF.view3])

        stackV.translatesAutoresizingMaskIntoConstraints = false
        stackV.axis = .horizontal
        stackV.spacing = 10
        stackV.distribution = .fillEqually

        return stackV
    }()

@chaneeii
Copy link
Owner Author

커스텀 스페이싱

let stackView = UIStackView()
let btn = UIButton()

stackView.addArrangedSubview(btn)
stackView.setCustomSpacing(20, after: btn)

@chaneeii chaneeii added the UIKit UIKit label Oct 17, 2022
@chaneeii
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UIKit UIKit
Projects
None yet
Development

No branches or pull requests

1 participant