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

[Feat] #40 - 방생성 설정 뷰 구현 #45

Merged
merged 8 commits into from
Jan 14, 2022

Conversation

yangsubinn
Copy link
Member

🌴 PR 요약

🌱 작업한 브랜치

🌱 작업한 내용

  • 방생성 플로우의 첫번째 뷰인 이름 설정 뷰 구현했습니다.
  • 레이아웃
  • textField 관련 메소드

📌 참고 사항

Keyboard+ 익스텐션으로 빼려고 했는데, 저런식으로 하는게 더 깔끔한 것 같기도 해서 저렇게 했습니다..
위에는 네비게이션바가 들어갈 것을 대비해서 일단 만들었는데,
저 부분은 네비바 적용된 다음에 다시 손보겠습니다.

📸 스크린샷

기능 스크린샷
입력 전
입력 중
글자수 초과

📮 관련 이슈

@yangsubinn yangsubinn added Feat 새로운 기능 구현 🦹t없e맑은水빈 우리 선배 이젠 타이니하지 않아 labels Jan 13, 2022
@yangsubinn yangsubinn self-assigned this Jan 13, 2022
Copy link
Member

@L-j-h-c L-j-h-c left a comment

Choose a reason for hiding this comment

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

텍필 딜리게이트 신기한것... 잘 보고 갑니다

Comment on lines +133 to +139
if text.count >= maxLength {
let maxIndex = text.index(text.startIndex, offsetBy: maxLength)
let newString = String(text[text.startIndex..<maxIndex])
textField.text = newString
countLabel.text = "15/15"
countLabel.textColor = .sparkPinkred
}
Copy link
Member

Choose a reason for hiding this comment

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

글자수가 초과할때마다 추가된 글자를 잘라주는거네요! 잘배워갑니당

Copy link
Member Author

Choose a reason for hiding this comment

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

그렇습니다 땡큐포현규선배

}
}

extension CreateRoomVC: UITextFieldDelegate {
Copy link
Member

Choose a reason for hiding this comment

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

텍스트필드 딜리게이트는 처음봐요...! 잘 보고 가요!

extension CreateRoomVC: UITextFieldDelegate {
/// 여백 클릭 시
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?){
self.view.endEditing(true)
Copy link
Member

Choose a reason for hiding this comment

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

endEditing이 true이고 false인 경우에 어떤 일을 하나요?

Copy link
Member

Choose a reason for hiding this comment

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

키보드가 내려가지 않습니당
참고하면 좋을거 같아서 남겨용
true if the view resigned the first responder status or false if it did not.

출처: https://developer.apple.com/documentation/uikit/uiview/1619630-endediting

Copy link
Member

@hyun99999 hyun99999 left a comment

Choose a reason for hiding this comment

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

네비바 야무지게 만들어뒀으니.. 낼 일어나시면 제꺼 머지하시고... 써주세여

Comment on lines +113 to +123
private func ableButton() {
lineView.backgroundColor = .sparkPinkred
nextButton.backgroundColor = .sparkPinkred
nextButton.isEnabled = true
}

private func disableButton() {
lineView.backgroundColor = .sparkGray
nextButton.backgroundColor = .sparkGray
nextButton.isEnabled = false
}
Copy link
Member

Choose a reason for hiding this comment

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

작성 시작에 대한 lineView 로! 고생하셨습니다!

Comment on lines +144 to +147
attributedString.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.sparkPinkred, range: ((countLabel.text ?? "") as NSString).range(of:"\(text.count)"))
countLabel.textColor = .sparkDarkGray
countLabel.attributedText = attributedString
}
Copy link
Member

Choose a reason for hiding this comment

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

오호..! 좋은 아이디어네요! 만약에 저라면
range 에 NSRange(location: 0, length: "\(text)".count) 요렇게 했을 거 같아요! 같은 역할이니 참고만 해주세욥 수고하셨어용

extension CreateRoomVC: UITextFieldDelegate {
/// 여백 클릭 시
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?){
self.view.endEditing(true)
Copy link
Member

Choose a reason for hiding this comment

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

키보드가 내려가지 않습니당
참고하면 좋을거 같아서 남겨용
true if the view resigned the first responder status or false if it did not.

출처: https://developer.apple.com/documentation/uikit/uiview/1619630-endediting

@yangsubinn yangsubinn merged commit ae51433 into TeamSparker:develop Jan 14, 2022
@yangsubinn yangsubinn deleted the feature/#40 branch January 27, 2022 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 구현 🦹t없e맑은水빈 우리 선배 이젠 타이니하지 않아
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] 방이름 설정 뷰 레이아웃
3 participants