Created
December 17, 2015 16:15
-
-
Save sergdort/898b66c978750400a09b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RxSwift | |
extension UITableView { | |
var rxex_nextPageTriger:Observable<Void> { | |
return self | |
.rx_contentOffset | |
.flatMapLatest { [unowned self] (offset) -> Observable<Void> in | |
let shouldTriger = offset.y + self.frame.size.height + 40 > self.contentSize.height | |
return shouldTriger ? just() : empty() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment