Open
Conversation
Collaborator
earlysummer0303
commented
Mar 17, 2022
- standard header 로 테이블 뷰 헤더를 구성했습니다.
- 아직 스위치의 조작을 통해 글자색을 변경시키는 이벤트는 구현하지 못했습니다.
seungbong88
requested changes
Mar 21, 2022
Contributor
seungbong88
left a comment
There was a problem hiding this comment.
고생하셨어요~ 라벨길이에 따라서 셀 높이가 동적으로 잘 바뀌네요!
switch 변경에 따라 화면을 업데이트 해주는 방법에 대해서 조금 더 공부해보고 수정해주세요~!
| func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
|
|
||
| return alarmInformationList.count | ||
| //return alarmInformationList.count |
| //isMorningLabel Setting | ||
| if alarmInformationList[indexPath.row].isAM == true { | ||
| cell.isMorningLabel.text = "오전" | ||
| } else {cell.isMorningLabel.text = "오후"} |
Contributor
There was a problem hiding this comment.
if / else 컨벤션 하나로 맞춰주세요~
| @IBOutlet weak var isMorningLabel: UILabel! | ||
| @IBOutlet weak var hourLabel: UILabel! | ||
| @IBOutlet weak var minuteLabel: UILabel! | ||
| @IBOutlet weak var onOffSwitch: UISwitch! |
Contributor
There was a problem hiding this comment.
switch의 이름을 onOffSwitch로 짓는게 적절할까요? Swift Naming Convention 한 번 더 참고해주시고 꼭 필요한 의미를 전달하지 않는 단어는 제외하도록 해주세요!
| cell.minuteLabel.textColor = UIColor.lightGray | ||
| cell.messageLabel.textColor = UIColor.lightGray | ||
| cell.seperatorLabel.textColor = UIColor.lightGray | ||
| } |
Contributor
There was a problem hiding this comment.
Alarm 객체의 isOn 프로퍼티에 따라서 라벨색과 switch의 isON을 변경해주고, 다시 switch의 isON 프로퍼티에 따라서 라벨색을 변경하도록 되어있네요. switch의 값이 변화할 때 이벤트를 핸들링해주는 Action에 대해 찾아보고, 그 이벤트가 발생할때에 한 번에 라벨 컬러가 변경되도록 수정해보세요!
| func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat { | ||
|
|
||
| return UITableView.automaticDimension | ||
| } |
seungbong88
reviewed
Mar 21, 2022
| func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
|
|
||
| return alarmInformationList.count | ||
| //return alarmInformationList.count |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.