Skip to content

Commit b3e3fe1

Browse files
committed
Updates Readme
1 parent 965e4bc commit b3e3fe1

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

README.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,6 @@
1616
- [x] Only animates if view is fully on screen
1717

1818
```swift
19-
import UIKit
20-
import KeyboardLayoutGuide
21-
22-
class ViewController: UIViewController {
23-
24-
// Create a keyboard layout guide.
25-
let keyboardLayoutGuide = KeyboardLayoutGuide()
26-
27-
@IBOutlet weak var button: UIButton!
28-
29-
override func viewDidLoad() {
30-
super.viewDidLoad()
31-
32-
// Add the layout guide in the view.
33-
view.addLayoutGuide(keyboardLayoutGuide)
34-
35-
// Constrain your button to the keyboardLayoutGuide's top Anchor
36-
// the way you would do natively :)
37-
button.bottomAnchor.constraint(equalTo: keyboardLayoutGuide.topAnchor).isActive = true
38-
}
39-
}
19+
button.bottomAnchor.constraint(equalTo: keyboardLayoutGuide.topAnchor).isActive = true
4020
```
21+
*Constrain your button to the keyboardLayoutGuide's top Anchor the way you would do natively :) *

0 commit comments

Comments
 (0)