dismiss kb with scroll

This commit is contained in:
Ryan Nystrom
2017-07-15 14:49:51 -04:00
parent 625f08eb1a
commit 8b6115e571
2 changed files with 3 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ protocol FeedDelegate: class {
func loadNextPage(feed: Feed) -> Bool
}
// disables auto scrolling when text views are focused
private class DisableAutoScrollCollectionView: UICollectionView {
override func scrollRectToVisible(_ rect: CGRect, animated: Bool) {}
}
@@ -29,6 +30,7 @@ final class Feed: NSObject, UIScrollViewDelegate {
let adapter: ListAdapter
lazy var collectionView: UICollectionView = {
let view = DisableAutoScrollCollectionView(frame: .zero, collectionViewLayout: UICollectionViewFlowLayout())
view.keyboardDismissMode = .interactive
view.alwaysBounceVertical = true
view.backgroundColor = Styles.Colors.background
view.refreshControl = UIRefreshControl()

View File

@@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>904</string>
<string>905</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>