일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
31 |
- 애니메이션
- ribs
- collectionview
- Xcode
- MVVM
- rxswift
- Protocol
- UICollectionView
- SWIFT
- uitableview
- swift documentation
- Refactoring
- 리펙토링
- combine
- Human interface guide
- RxCocoa
- map
- UITextView
- HIG
- Clean Code
- clean architecture
- ios
- 리팩토링
- uiscrollview
- Observable
- 스위프트
- 클린 코드
- tableView
- swiftUI
- 리펙터링
- Today
- Total
목록Scroll (3)
김종권의 iOS 앱 개발 알아가기
구현 아이디어 상단에는 UIImageView, 하단에는 스크롤되는 UITableView나 UICollectionView 준비 (예제에서는 UICollectionView 사용) UIImageView와 UICollectionView 레이아웃 UICollectionView의 topAnchor를 화면의 최상단으로 제약 UICollectionView의 top contentInset값을 UIImageView의 크기만큼 설정 - UIImageView가 마치 collectionView의 하나의 셀처럼 보이도록 하기 위함 상단의 UIImageView도 마치 스크롤 되는 동작처럼 보여야하므로, scrollViewDidScroll(_:) 델리게이트에서, scrollView.contentOffset.y값을 이용하여 UIIma..
UITableView에서 스크롤 이동 tableView.scrollToRow(at:at:animated:) 메서드 사용 UI적인 접근이 필요하므로 main 스레드에서 접근 @IBAction func didTapButton(_ sender: Any) { DispatchQueue.main.async { [weak self] in self?.tableView.scrollToRow(at: IndexPath(row: 77, section: 0), at: .bottom, animated: true) } } CollectionView에서 스크롤 이동 collectionView.scrollToItem(at:at:animated:) 메서드 이용 main 스레드로 접근 @objc func didTapMoveScrollB..
sc특정 textField를 탭한 경우, 특정 위치로 scroll시키는 로직 ScrollView만들기 여기 참고 방향 정의 public enum ScrollDirection { case top case center case bottom } extension으로 scroll이동 구현 public extension UIScrollView { func scroll(to direction: ScrollDirection) { DispatchQueue.main.async { switch direction { case .top: self.scrollToTop() case .center: self.scrollToCenter() case .bottom: self.scrollToBottom() } } } private f..