Latest 0.1
License MIT
Platforms ios 7.0, requires ARC

MCObservation License MIT

Badge w/ Version
Badge w/ Platform

Easy-to-use, fire-and-forget KVO and notifications.


Add the following to your CocoaPods Podfile

pod 'MCObservation', '~> 1.0'

or clone as a git submodule,

or just copy files in the MCObservation folder into your project.

Using MCObservation

Observing changes to models

Make your view objects observe your models for changes:

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
      [self mc_observeKeyPath:@"object.title" withBlock: ^(NSString *keyPath, NSDictionary *change) {
      self.textLabel.text = self.object.title;
  return self;

Keyboard Animations

You can configure velocity, springBounciness and springSpeed.

[self mc_animateAlongsideKeyboardWithShowAnimations: ^(CGRect keyboardFrame) {
    self.textField.backgroundColor = [UIColor colorWithRed:1.000 green:0.231 blue:0.188 alpha:0.5];
} andHideAnimations: ^(CGRect keyboardFrame) {
    self.textField.backgroundColor = nil;

There is no need to unregister any notifications.


MCObservation is under the MIT license.

Latest podspec

    "name": "MCObservation",
    "version": "0.1",
    "platforms": {
        "ios": "7.0"
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "summary": "Easy-to-use, fire-and-forget KVO and notifications.",
    "homepage": "",
    "authors": {
        "Matthew Cheok": "[email protected]"
    "requires_arc": true,
    "source": {
        "git": "",
        "branch": "master",
        "tag": "0.1"
    "source_files": "MCObservation/*.{h,m}",
    "public_header_files": "MCObservation/*.h"

Pin It on Pinterest

Share This