mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-05-29 17:27:06 +08:00
dismiss kb with scroll
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>904</string>
|
||||
<string>905</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
|
||||
Reference in New Issue
Block a user