Germanygiulio92/GLTableCollectionView
Netflix and App Store like UITableView with UICollectionView, written in pure Swift 4.2
📱 GLTableCollectionView — UITableView với UICollectionView trong từng ô
Một UITableViewController sẵn có UICollectionView trong mỗi UITableViewCell, giống giao diện Netflix hay App Store.
GLTableCollectionView là một thư viện Swift 4.2 cho phép nhúng UICollectionView vào từng UITableViewCell, tạo ra giao diện dạng danh sách có lưới con như các ứng dụng Netflix, Airbnb hay App Store. Tự động tái sử dụng cell, hỗ trợ phân trang cuộn dựa trên kích thước cell, và tùy biến hoàn toàn cả UITableView và UICollectionView thông qua Data Source và Delegate chuẩn.
✨ Điểm nổi bật
- Tái sử dụng UITableViewCell chuẩn Apple: logic reusable cells giống hệt UITableView gốc
- Tái sử dụng UICollectionView: hỗ trợ recycle cell trong UICollectionView
- Hỗ trợ phân trang theo kích thước cell: cuộn horizontals theo từng cell
- Phục hồi contentOffset: lưu và khôi phục vị trí cuộn trước đó
- Tương thích Storyboard & Auto Layout: dễ tích hợp vào dự án hiện tại
- Tùy biến headers & footers: cả UITableView và UICollectionView đều hỗ trợ
- Clean architecture: cấu trúc mã nguồn gọn gàng, dễ bảo trì
- Unit Tests: đảm bảo độ tin cậy của thư viện
💡 Vì sao đáng chú ý
Không cần viết thủ công logic nhúng UICollectionView vào UITableViewCell phức tạp — GLTableCollectionView cung cấp một UITableViewController đã xây dựng sẵn, tuân thủ chuẩn Data Source/Delegate của Apple, giúp giảm tối đa effort tích hợp. Phù hợp cho các ứng dụng iOS cần giao diện danh sách phong phú với lưới con như App Store, truyền thống.
#Swift #iOS #UICollectionView #UITableView #OpenSource #TiniX
Similar Projects
Discover other similar projects and AI models.
A lightweight, pure-Swift library for downloading and caching images from the web.
Flutter makes it easy and fast to build beautiful apps for mobile and beyond
📝 CodeEdit App for macOS – Elevate your code editing experience. Open source, free forever.