Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AramSemerjyan authored Jun 6, 2020
1 parent 6a638e4 commit 564a00d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ Just call `toggleSize(forIndexPath:)` On `UGridFlowLayout` instance. Layout will
...
```

If there isn't any size info in the store for the item yet by default `small` size will be used. You can change default size by calling `setDefaultGridSize(_ size: SizeType)` on `UGridFlowLayout` instance:

```swift
...
override func viewDidLoad() {
...

_layout.setDefaultGridSize(.middle)

...
}
...
```

After this every new added item will have `middle` size instead default `small`.

#### Store changes
For simplicity `UserDefaults` is used to save size for each cell index path. If you still want to handle storing by yourself You want to check [Change behaviour section](#change-behaviour)

Expand Down

0 comments on commit 564a00d

Please sign in to comment.