스크롤 가능한 모든 뷰 컨트롤러들은 UIScrollView를 상속받는다.
장점
- Makes anything scsrollable
- Minimalist
- Full conrol
- Good for long pages
단점
- Can’t easily reload
- No built in affordances (i.e. pull to refresh)
- Auto Layout more complex
The UICollectionView
장점
- Customizable layouts
- Multi-column scrollable
- Can dynamically change layout
- Good for photos in a grid
단점
- More complex
- Often overkill
- 단순한 레이아웃을 만들 때는 비효율적이나, 복잡한 레이아웃을 구현할 때는 적합하다.
The UITableView
UITableView의 구성
- Header
- Section
- Section Header
- Section Footer
- Rows or data
- Footer
장점
- Highly performant (reuseIdentifiers)
- Many affordances built in (header, footer, sections)
- Perfect for single column list
단점
- Hard to do complex non-single column layouts
Which to choose and when
Which to use?
- UIScrollView: Common
- UICollectionView: Rare (실제 프로젝트에서 많이 쓰이지 않음)
- UITableView: All the time