Skip to content

Commit 59331ee

Browse files
SahilSainiYMLmpospese
authored andcommitted
[UPDATE] updated according to review comment
1 parent 3497d6b commit 59331ee

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ addSubview(button)
3333
button.constrain(.width, constant: 100)
3434

3535
// constrain view to superview
36-
3736
let container = UIView()
3837
addSubview(container)
3938
container.constrain(.leading, to: .leading, of: superview)
@@ -50,8 +49,7 @@ Another flavor creates constraints using anchors just like the anchor api’s fi
5049
addSubview(button)
5150
button.constrain(.widthAnchor, constant: 100)
5251

53-
// constrain view to superview**
54-
52+
// constrain view to superview
5553
let container = UIView()
5654
addSubview(container)
5755
container.constrain(.leadingAnchor, to: leadingAnchor)
@@ -189,19 +187,20 @@ final class ColorsTests: XCTestCase {
189187

190188
### 3. UIScrollView extensions to assist with keyboard avoidance
191189

192-
#### `FormViewController` is a view controller with a scrollable content area that will automatically avoid the keyboard for you. It is a good choice for views that have inputs (e.g. login or onboarding). Even for views without inputs, it is still quite useful for managing the creation of a `UIScrollView` and a `contentView` set within it, so that you can focus on your content and not have to code a scrollView for every view.
190+
#### FormViewController
193191

194-
<aside>
195-
💡 Almost every full-screen view in your app that contains any text should be a scroll view because of the vagaries of localization, Dynamic Type, potentially small screen sizes, and landscape mode support.
196-
</aside>
192+
`FormViewController` is a view controller with a scrollable content area that will automatically avoid the keyboard for you. It is a good choice for views that have inputs (e.g. login or onboarding). Even for views without inputs, it is still quite useful for managing the creation of a `UIScrollView` and a `contentView` set within it, so that you can focus on your content and not have to code a scrollView for every view.
197193

198-
#### `UIScrollview` Extensions
194+
#### UIScrollview Extensions
199195

200196
Want to have a scrollview that avoids the keyboard, but you can’t use `FormViewController`? Most of its functionality is a simple extension to `UIScrollView`. You can add keyboard avoidance to any scroll view like so:
201197

202198
```swift
203199
scrollView.registerKeyboardNotifications()
204200
```
201+
<aside>
202+
💡 Almost every full-screen view in your app that contains any text should be a scroll view because of the vagaries of localization, Dynamic Type, potentially small screen sizes, and landscape mode support.
203+
</aside>
205204

206205
Installation
207206
----------

0 commit comments

Comments
 (0)