File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,10 @@ public extension Reactive where Base: UIScrollView {
17
17
- returns: ControlEvent that emits when the bottom of the base UIScrollView is reached.
18
18
*/
19
19
func reachedBottom( offset: CGFloat = 0.0 ) -> ControlEvent < Void > {
20
- let source = contentOffset. map { [ base ] contentOffset in
21
- let visibleHeight = base. frame. height - base. contentInset. top - base. contentInset. bottom
22
- let y = contentOffset. y + base. contentInset. top
23
- let threshold = max ( offset, base. contentSize. height - visibleHeight)
20
+ let source = contentOffset. map { contentOffset in
21
+ let visibleHeight = self . base. frame. height - self . base. contentInset. top - self . base. contentInset. bottom
22
+ let y = contentOffset. y + self . base. contentInset. top
23
+ let threshold = max ( offset, self . base. contentSize. height - visibleHeight)
24
24
return y >= threshold
25
25
}
26
26
. distinctUntilChanged ( )
You can’t perform that action at this time.
0 commit comments