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

[Jiwoo] 4주차 미션 - 알람앱 하는중 #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

earlysummer0303
Copy link
Collaborator

  • standard header 로 테이블 뷰 헤더를 구성했습니다.
  • 아직 스위치의 조작을 통해 글자색을 변경시키는 이벤트는 구현하지 못했습니다.

Copy link
Contributor

@seungbong88 seungbong88 left a comment

Choose a reason for hiding this comment

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

고생하셨어요~ 라벨길이에 따라서 셀 높이가 동적으로 잘 바뀌네요!
switch 변경에 따라 화면을 업데이트 해주는 방법에 대해서 조금 더 공부해보고 수정해주세요~!

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {

return alarmInformationList.count
//return alarmInformationList.count
Copy link
Contributor

Choose a reason for hiding this comment

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

불필요 주석은 제거해주세요~

//isMorningLabel Setting
if alarmInformationList[indexPath.row].isAM == true {
cell.isMorningLabel.text = "오전"
} else {cell.isMorningLabel.text = "오후"}
Copy link
Contributor

@seungbong88 seungbong88 Mar 21, 2022

Choose a reason for hiding this comment

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

if / else 컨벤션 하나로 맞춰주세요~

@IBOutlet weak var isMorningLabel: UILabel!
@IBOutlet weak var hourLabel: UILabel!
@IBOutlet weak var minuteLabel: UILabel!
@IBOutlet weak var onOffSwitch: UISwitch!
Copy link
Contributor

Choose a reason for hiding this comment

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

switch의 이름을 onOffSwitch로 짓는게 적절할까요? Swift Naming Convention 한 번 더 참고해주시고 꼭 필요한 의미를 전달하지 않는 단어는 제외하도록 해주세요!

cell.minuteLabel.textColor = UIColor.lightGray
cell.messageLabel.textColor = UIColor.lightGray
cell.seperatorLabel.textColor = UIColor.lightGray
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Alarm 객체의 isOn 프로퍼티에 따라서 라벨색과 switch의 isON을 변경해주고, 다시 switch의 isON 프로퍼티에 따라서 라벨색을 변경하도록 되어있네요. switch의 값이 변화할 때 이벤트를 핸들링해주는 Action에 대해 찾아보고, 그 이벤트가 발생할때에 한 번에 라벨 컬러가 변경되도록 수정해보세요!

func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {

return UITableView.automaticDimension
}
Copy link
Contributor

Choose a reason for hiding this comment

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

코드 정렬 해주세요~

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {

return alarmInformationList.count
//return alarmInformationList.count
Copy link
Contributor

Choose a reason for hiding this comment

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

불필요 주석은 제거해주세요~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants