Skip to content

A lightweight wrapper for KVO, bind view and model easily

License

Notifications You must be signed in to change notification settings

draveness/OKObserver

Repository files navigation

OKObserver

A lightweight framework which makes KVO easily to use.

CI Status Version License Platform

Installation

OKObserver is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "OKObserver"

Usage

Use OKObserver to bind view and model.

[OKObserve(object, color) update:OKObserve(self.view, backgroundColor)];

Easily to use API for KVO

[OKObserve(object, color) whenUpdated:^(UIColor *backgroundColor) {
    self.view.backgroundColor = backgroundColor;
}];

The two usage above has the same function.

Author

Draveness, stark.draven@gmail.com

License

OKObserver is available under the MIT license. See the LICENSE file for more info.

About

A lightweight wrapper for KVO, bind view and model easily

Resources

License

Stars

Watchers

Forks

Packages

No packages published