Skip to content

Commit 1842aaa

Browse files
committed
Fixed titles in doc
1 parent 0b1bc4a commit 1842aaa

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

README.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,12 @@ You can think of it as `UITableView` but with several differences:
7070

7171
### When to use `ScrollStackController` and when not
7272

73-
##### Yes
74-
7573
`ScrollStackController` is best used for shorter screens with an heterogeneous set of rows: in these cases you don't need to have view recycling.
7674

7775
Thanks to autolayout you will get updates and animations for free.
7876

7977
You can also manage each screen independently with a great separation of concerns; morehover unlike `UITableView` and `UICollectionView`, you can keep strong references to `UIViewController` (and its views) in an `ScrollStack` view and make changes to them at any point.
8078

81-
#### No
82-
8379
`ScrollStackController` is not suitable in all situations.
8480
`ScrollStackController` lays out the entire UI at first time when your screen loads.
8581
If you have a long list of rows you may experience delays.
@@ -142,7 +138,7 @@ Let's take a look below.
142138

143139
<a name="addingrows"/>
144140

145-
#### Adding Rows
141+
### Adding Rows
146142

147143
`ScrollStack` provides a comprehensive set of methods for managing rows, including inserting rows at the beginning and end, inserting rows above or below other rows.
148144

@@ -174,7 +170,7 @@ As you noticed there is not need to keep a strong reference to any view controll
174170

175171
<a name="removingreplacingrows"/>
176172

177-
#### Removing / Replacing Rows
173+
### Removing / Replacing Rows
178174

179175
A similar set of APIs are used to remove existing rows from the stack:
180176

@@ -196,7 +192,7 @@ stackView.replaceRow(index: 1, withRow: galleryVC, animated: true) {
196192

197193
<a name="moverows"/>
198194

199-
#### Move Rows
195+
### Move Rows
200196

201197
If you need to adjust the hierarchy of the stack by moving a row from a position to another you can use:
202198

@@ -213,7 +209,7 @@ stackView.moveRow(index: 0, to: randomDst, animated: true, completion: nil)
213209

214210
<a name="hideshowrows"/>
215211

216-
#### Hide / Show Rows
212+
### Hide / Show Rows
217213

218214
`ScrollStack` uses the power of `UIStackView`: you can show and hide rows easily with a gorgeous animation by using one of the following methods:
219215

@@ -232,7 +228,7 @@ Keep in mind: when you hide a rows the row still part of the stack and it's not
232228

233229
<a name="reloadrows"/>
234230

235-
#### Reload Rows
231+
### Reload Rows
236232

237233
Reload rows method allows you to refresh the layout of the entire stack (using `layoutIfNeeded()`) while you have a chance to update a specific row's `contentView` (aka the view of the managed `UIViewController`).
238234

@@ -272,7 +268,7 @@ class GalleryVC: UIViewController, ScrollStackContainableController {
272268

273269
<a name="sizingrows"/>
274270

275-
#### Sizing Rows
271+
### Sizing Rows
276272

277273
You can control the size of your `UIViewController` inside a row of a `ScrollStack` in two ways:
278274

@@ -292,7 +288,7 @@ Each of the following cases is covered inside the demo application:
292288

293289
<a name="fixedrowsize"/>
294290

295-
#### Fixed Row Size
291+
### Fixed Row Size
296292

297293
If your view controller has a fixed size you can just return it as follows:
298294

@@ -320,7 +316,7 @@ When you will add this view controller in a scroll stack it will be sized as you
320316

321317
<a name="fittinglayoutrowsize"/>
322318

323-
#### Fitting Layout Row Size
319+
### Fitting Layout Row Size
324320

325321
Sometimes you may want to have the content view sized by fitting the contents of the view controller's view. In these cases you can use `. fitLayoutForAxis`.
326322

@@ -338,7 +334,7 @@ public func scrollStackRowSizeForAxis(_ axis: NSLayoutConstraint.Axis, row: Scro
338334

339335
<a name="collapsiblerows"/>
340336

341-
#### Collapsible Rows
337+
### Collapsible Rows
342338

343339
Sometimes you may want to create collapsible rows.
344340
These row can have different heights depending of a variable.
@@ -377,7 +373,7 @@ And your rows will perform a great animation to resize its content.
377373

378374
<a name="workingwithdynamicuicollectionviewuitableviewuitextview"/>
379375

380-
#### Working with dynamic UICollectionView/UITableView/UITextView
376+
### Working with dynamic UICollectionView/UITableView/UITextView
381377

382378
There are some special cases where you may need to resize the row according to the changing content in your view controller's view.
383379

@@ -419,7 +415,7 @@ In this way as you add new value to the table the size of the row in stack view
419415

420416
<a name="rowsseparator"/>
421417

422-
#### Rows Separator
418+
### Rows Separator
423419

424420
Each row managed by `ScrollStack` is of a subview class of type `ScrollStackRow`. It has a strong referenced to managed `UIViewController` but also have a subview on bottom called `ScrollStackSeparator`.
425421

@@ -438,7 +434,7 @@ Moreover you can set these values directly on `ScrollStack` controller in order
438434

439435
<a name="taponrows"/>
440436

441-
#### Tap On Rows
437+
### Tap On Rows
442438

443439
By default rows are not tappable but if you need to implement some sort of tap features like in `UITableView` you can add it by setting a default callback for `onTap` property on `ScrollStackRow` instances.
444440

0 commit comments

Comments
 (0)