일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- tableView
- Refactoring
- uitableview
- rxswift
- swift documentation
- Observable
- combine
- 클린 코드
- UITextView
- 리팩토링
- RxCocoa
- HIG
- collectionview
- swiftUI
- ios
- UICollectionView
- 리펙토링
- map
- 스위프트
- Xcode
- uiscrollview
- clean architecture
- ribs
- MVVM
- 애니메이션
- Protocol
- 리펙터링
- Human interface guide
- Clean Code
- SWIFT
- Today
- Total
목록tableviewcell (3)
김종권의 iOS 앱 개발 알아가기
CheckBoxCell 구현 isCheck라는 property가 있고, 이 property를 통해 check되면 체크 이미지를 업데이트하고 값을 가지고 있는 상태 // CheckboxCell.swift var isCheck: Bool = false { didSet { let imageName = isCheck ? "checkmark.square" : "checkmark.square.fill" checkBoxButton.setImage(UIImage(systemName: imageName), for: .normal) } } cell이 check되는지 확인은 UITableViewCell에서 제공하는 setSelected(:animated:)를 override하여 사용 // CheckboxCell.swift..
Cell 선택 UI 설정 방법 custom cell이 있다면 custom cell의 setSelected(:animated:) 함수에서 사용 tableView가 표출될때 초기에는 모든 cell이 선택되지 않은 상태 하나를 선택하면 나머지 cell이 선택되지 않은 상태가 되고 해당 cell 하나만 선택되게끔 내부적으로 동작 // 선택, 미선택에 따라 cell의 테두리 색깔을 다르게 하는 부분 // UITableViewCell을 상속받은 customCell안에서 override override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) if selected { conten..
Cell 이동 애니메이션 적용 아이디어 CGPoint값을 가지고 tableView에서 cell의 위치를 알 수 있는 것: let indexPath = tableView.indexPathForRow(at:) UIGraphics를 통해 스냅샷을 찍어서, 그 스냅샷 이미지에 shadow 속성 부여 후 tableView.addSubview(스냅샷 뷰) 함수 내에 struct, static let으로 할당하여, 최초 longPressed할 때의 indexPath값을 head 메모리에 저장 longPressed의 .changed 상태가 연속적으로 일어나므로 여기에서 스냅샷 뷰의 center좌표를 바꾸어줌으로써 이동 동시에 dataSource도 swap 사용 Cell 사용 Edit모드는 지양할 것 > 버튼을 눌러서 ..