It's very simple.
CADisplayLink.rx.link()
.subscribe(onNext: { _ in
// Your freedom
})
.disposed(by: disposeBag)
Of course, you can set RunLoop, Mode and FPS. 👌
CADisplayLink.rx.link(to: .current, forMode: .defaultRunLoopMode, fps: 30)
// OR
RxDisplayLink(to: .current, forMode: .defaultRunLoopMode, fps: 30)
Add the following to your Podfile
:
pod "RxDisplayLink"
use_frameworks!
Add the following to your Cartfile
:
github "KyoheiG3/RxDisplayLink"
Follow me 🎉
Under the MIT license. See LICENSE file for details.
link |
Stars: 29 |
Last commit: 1 year ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics