Skip to content

Commit 6ef1280

Browse files
committed
Working on documentation
1 parent 9bca657 commit 6ef1280

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
11
# ScrollStackController
2-
Create complex scrollable layout using UIViewController and simplify your code
2+
Create complex scrollable layout using UIViewController and simplify your code!
3+
4+
## Introduction
5+
ScrollStackController is a class you can use to create complex layouts using scrollable `UIStackView` but where each row is handled by a separate `UIViewController`; this allows you to keep a great separation of concerns.
6+
7+
You can think of it as `UITableView` but with several differences:
8+
9+
- **Each row is a different `UIViewController` you can manage independently**: no more massimove controllers, a much cleaner layout.
10+
- **Powered by AutoLayout since the beginning**; it uses a combination of UIScrollView + UIStackView to offer an animation friendly controller ideal for fixed and dynamic row sizing.
11+
- **You don't need to struggle yourself with view recycling**: suppose you have a layout composed by several different screens. There is no need of view recycling but it cause a more difficult managment of the layout. With a simpler and safer APIs set `ScrollStackView` is the ideal way to implement such layouts.
12+
13+
## Table of Contents
14+
15+
- Main Features
16+
- System Requirements
17+
- How to use it
18+
19+
### Main Features
20+
21+
22+
| | Features Highlights |
23+
|--- |--------------------------------------------------------------------------------- |
24+
| 🕺 | Create complex layout without the boilerplate required by view recyling of `UICollectionView` or `UITableView`. |
25+
| 🧩 | Simplify your architecture by thinking each screen as a separate-indipendent `UIVIewController`. |
26+
| 🌈 | Animate show/hide and resize of rows easily! |
27+
|| Compact code base, less than 1k LOC with no external dependencies. |
28+
| 🎯 | Easy to use and extensible APIs set. |
29+
| 🧬 | It uses standard UIKit components at its core. No magic, just a combination of `UIScrollView`+`UIStackView`. |
30+
| 🐦 | Fully made in Swift 5 from Swift ❥ lovers |
31+
32+
### System Requirements
33+
34+
- iOS 9+
35+
- Xcode 10+
36+
- Swift 5+
37+
38+
### How to use it

ScrollStackControllerDemo/Child View Controllers/GalleryVC.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ extension GalleryVC: UICollectionViewDataSource, UICollectionViewDelegateFlowLay
5959
}
6060

6161
public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
62-
let size = collectionView.bounds.size
63-
return size
62+
//let size = collectionView.bounds.size
63+
return CGSize(width: 310, height: collectionView.bounds.size.height) // fix here
6464
}
6565

6666
public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {

0 commit comments

Comments
 (0)