-
Notifications
You must be signed in to change notification settings - Fork 1
[REFACTOR] ACTextField 컴포넌트 구현 및 교체 (#102) #103
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Files not reviewed (1)
- ACON-iOS/ACON-iOS.xcodeproj/project.pbxproj: Language not supported
Comments suppressed due to low confidence (3)
ACON-iOS/ACON-iOS/Presentation/Upload/View/SpotSearchViewController.swift:232
- The assignment of the text field delegate was removed. Please verify that all required delegate functionalities are now properly addressed through bindings or other means.
spotSearchView.searchTextField.delegate = self
ACON-iOS/ACON-iOS/Global/UIComponents/ACTextField.swift:135
- [nitpick] The asset name 'icDissmissCircleGray' may contain a typo; consider renaming it to 'icDismissCircleGray' if this is not intentional.
$0.setImage(.icDissmissCircleGray, for: .normal)
ACON-iOS/ACON-iOS/Global/UIComponents/ACTextField.swift:170
- Ensure that 'toolbar' is properly defined and configured within the scope used, as the input accessory may not be set correctly otherwise.
textField.inputAccessoryView = toolbar
cirtuare
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥑😽 리뷰 늦어서 미안해여 .. 고생해따 최고 !!!!
| } | ||
|
|
||
| clearButton.snp.makeConstraints { | ||
| $0.trailing.equalToSuperview().offset(-horizontalInset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐿️🐿️
이런 거 inset으로 처리해주면 더 깔끔할 것 같네요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inset으로 하면 이상해지는 UI가 몇 개 있어서 통일감있게 offset으로 설정했고, horizontal / vertical edges만 inset 메소드 사용했어요!
| } | ||
|
|
||
| @objc func dismissKeyboard() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐿️
@objc 줄바꿈해주세요 !
|
|
||
| func changeBorderColor(toRed: Bool) { | ||
| self.layer.borderColor = toRed ? UIColor.red1.cgColor : UIColor.gray6.cgColor | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐿️🐿️
이런 거 color을 인자로 받아도 좋을 것 같아요!
isChange: Bool, color: UIColor? = UIColor.red1.cgColor
로 일단 해두어서 확장성 좋게 하는 건 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋아요~~
| self.do { | ||
| $0.backgroundColor = .gray8 | ||
| $0.clipsToBounds = true | ||
| $0.layer.borderColor = UIColor.gray5.cgColor | ||
| $0.layer.borderWidth = 1 | ||
| $0.layer.cornerRadius = 4 | ||
| } | ||
|
|
||
| setKeyboardStyle() | ||
| textField.do { | ||
| $0.autocorrectionType = .no | ||
| $0.defaultTextAttributes = [ | ||
| .font: ACFontStyleType.s1.font, | ||
| .kern: ACFontStyleType.s1.kerning, | ||
| .foregroundColor: UIColor.acWhite | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐿️🐿️🐿️
물론 저희가 현재 사용하는 텍스트필드 속성들이 일관되어 있어서 이렇게 하는 것도 좋지만,
얘네를 기본 속성값으로 가져가되, 텍스트필드의 여러 속성들을 ACTextField의 생성자로 가져가면 더욱 더 확장성 좋은 ACTextField가 될 것 같아요 ~ !
init(backgroundColor: UIColor? = .gray8, borderColor: UIColor? = .gray5, borderWidth: Int? = 1, cornerRadius: Int?? = 4, textFont: ACFont? = ACFontStyleType.s1.font, 등등등 .... )
이런 식으로 가져가는 건 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
나중에 더 나아간다면 ACTextFieldType으로 정의해서 빼줘도 좋을 것 같아요 ~!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋아요~~ 반영했슴당
🐿️ Pull Requests
🪵 작업 브랜치
🥔 작업 내용
ACTextField를 구현했고,
ProfileEdit,SpotSearch텍스트필드에 적용했습니다.🚨 참고 사항
📸 스크린샷
💥 To be sure
🌰 Resolve issue