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

[#27] HandyList 제작 #28

Merged
merged 4 commits into from
Jan 4, 2025
Merged

[#27] HandyList 제작 #28

merged 4 commits into from
Jan 4, 2025

Conversation

LeeJoEun-01
Copy link
Contributor

📌 Summary

  • HandyList를 만들었습니다.
    • ListItem을 만들어서 List에 쌓아주는 형식입니다.

✍️ Description

💡 PR Point

📚 Reference

🔥 Test

Simulator Screen Recording - iPhone 16 Pro - 2024-11-18 at 19 32 19

@LeeJoEun-01 LeeJoEun-01 added the feat 💜 새로운 기능 구현 label Nov 18, 2024
@LeeJoEun-01 LeeJoEun-01 self-assigned this Nov 18, 2024
let label = HandyLabel()
label.style = .B1Rg16
label.textColor = HandySemantic.textBasicPrimary
label.textAlignment = .left
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

textAlignment의 기본값이 left인데
이렇게 코드로 명시적으로 표현해주는게 좋을까요?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

항상 왼쪽으로만 정렬되어 있어야 한다면 명시적으로 표현해주는 것도 괜찮죠!

나중을 생각해보면, 이 기본값이 바뀔 때 HandyList에서의 기본 값도 바뀌어야 한다면 오히려 지정하지 않는게 더 좋을 수도 있다고 생각해요!

예를 들어, 아랍권에서 label이 오른쪽에서 왼쪽으로 써질 때, textAlignment 역시 오른쪽으로 바뀌어야 할 것 같아요!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그렇군요 생각하지 못한 부분이에요! 근데 예시로 들어주신 경우 보다는 나중에 유지보수를 하는 사람들이나 핸디를 사용하는 사람들한테 보다 직관적으로 보여주는게 더 중요하다고 생각되네요!

Comment on lines +10 to +23
final public class HandyList: UIView {

/**
HandyList 요소들을 담는 StackView
*/

private let stackView: UIStackView = {
let stackView = UIStackView()
stackView.axis = .vertical
stackView.distribution = .fill
stackView.spacing = 0
return stackView
}()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StackView로 설계하신 이유가 궁금해요!! HandyListItem을 cell로 등록된 tableView나 collectionView같은 요소도 충분히 고려할만 하다고 생각해서요!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 HandyList의 사용성을 생각했을 때 조금 특이한 디자인들은 아니라고 생각해서
주로 설정 페이지에서 이렇게 Title과 List가 세트로 차곡차곡 쌓여서 사용된다고 생각했어요!
그래서 tableView, collectionView로 굳이 만들지 않았습니다!
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리스트 아이템의 개수가 많아지면 뷰 로딩이나 사용하는 메모리 측면에서 단점이 생길 수 있다고 생각되지만, 이런 유스케이스라면 굳이 cell을 따로 지정하는 방식 보다는 스택 뷰도 일리가 있겠네요!!

@LeeJoEun-01 LeeJoEun-01 merged commit a44d6d2 into main Jan 4, 2025
@LeeJoEun-01 LeeJoEun-01 deleted the feature/#27 branch January 4, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 💜 새로운 기능 구현
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants