We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
체크된 요일을
위와 같이 보여줘야함
func selectDay(index: Int, isSelected: Bool) { let isBool = isSelected == false switch index { case 0: monday = isBool ? week[0] : "" case 1: tuesday = isBool ? week[1] : "" case 2: wednesday = isBool ? week[2] : "" case 3: thursday = isBool ? week[3] : "" case 4: friday = isBool ? week[4] : "" case 5: saturday = isBool ? week[5] : "" default: sunday = isBool ? week[6] : "" } days = monday + tuesday + wednesday + thursday + friday + saturday + sunday
func checkImageIsHidden(_ dayViewModel: PillDayViewModel, indexPath: IndexPath) { checkImage.isHidden.toggle() isSelected.toggle() dayViewModel.selectDay(index: indexPath.row, isSelected: checkImage.isHidden) }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { guard let cell = tableView.cellForRow(at: indexPath) as? PillDayTableViewCell else { return } cell.checkImageIsHidden(viewModel, indexPath: indexPath) }
extension String { func addSeparator() -> String { let string = self.map{String($0)} let separator = string.joined(separator: ", ") return separator } }
배열에 특정 요소를 추가하여 묶는 방법
시퀀스 사이에 원하는 separator를 넣어줄 수 있음 . .
separator
생각보다 너무 간단하고 유용한 듯 . .
The text was updated successfully, but these errors were encountered:
seungchan2
No branches or pull requests
체크된 요일을
위와 같이 보여줘야함
ViewModel
TableViewCell
ViewController
String ++ Extension
joined
배열에 특정 요소를 추가하여 묶는 방법
시퀀스 사이에 원하는
separator
를 넣어줄 수 있음 . .생각보다 너무 간단하고 유용한 듯 . .
The text was updated successfully, but these errors were encountered: