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

UIView 의 우선순위 #48

Open
chaneeii opened this issue Oct 16, 2022 · 2 comments
Open

UIView 의 우선순위 #48

chaneeii opened this issue Oct 16, 2022 · 2 comments
Labels
UIKit UIKit

Comments

@chaneeii
Copy link
Owner

https://stackoverflow.com/questions/38780743/how-can-i-bring-a-view-in-front-of-another-view-in-swift

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

스크린샷 2022-10-17 오전 1 33 57

@chaneeii
Copy link
Owner Author

https://zeddios.tistory.com/m/832

요렇게 만들고 싶은데,
스크린샷 2022-10-17 오후 5 10 46

이렇게 되었다..!

스크린샷 2022-10-17 오후 5 11 59

해결방법은!!

contentview를 기준으로 sendSubviewToBack 을 해주었다!

    func createLayout() {
        contentView.addSubviews([imageView, emojiView, menuLabel, dateLabel])

        contentView.sendSubviewToBack(emojiView)
        emojiView.snp.makeConstraints {
            $0.top.equalToSuperview()
            $0.leading.equalToSuperview().offset(9)
            $0.width.height.equalTo(30)
        }
        
        imageView.snp.makeConstraints {
            $0.top.equalToSuperview().inset(15)
            $0.leading.trailing.equalToSuperview()
            $0.width.height.equalTo(167)
        }

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