Latest 1.0.0
Homepage https://github.com/bigworkindustries/BigViewModel
License MIT
Platforms ios 7.0, requires ARC
Authors

A collection of Objective-C macros that provide convenience methods for observing model objects on views.

Version
License
Platform

Requirements

  • iOS
  • Objective-C

Installation

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

pod "BigViewModel"

Usage

In your .h @interface add the BIG_VIEW_MODEL_PROPERTY() macro for example:


@interface MYViewControllerBase : UIViewController

BIG_VIEW_MODEL_PROPERTY(MyAwesomeModelType*)

@end

And in your .m @implementation add the BIG_VIEW_MODEL_KVO() macro for example:


@implementation MYViewControllerBase

BIG_VIEW_MODEL_KVO(MyAwesomeModelType*)

@end

These macros implement a model object property and method signature in the class, for example:


@property (nonatomic,strong) MyAwesomeModelType* bigModel;

- (void)didUpdateBigModel:(MyAwesomeModelType*)bigModel;

Implement the - (void)didUpdateBigModel: method in the .m file of the class, ror example:


- (void)didUpdateBigModel:(MyAwesomeModelType*)bigModel
{
    // Do something dynamically profound in a programmatic fashion with bigModel!
}

The - (void)didUpdateBigModel: method will be called whenever the self.big_model property is changed.

  • Note: If you don’t override the - (void)didUpdateBigModel: method, a compiler warning will be generated. If you don’t plan to implement that method, you can use the BIG_VIEW_MODEL_PROPERTY_ONLY() method instead of the BIG_VIEW_MODEL_PROPERTY() method in your .h class header file.

Author

License

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

Latest podspec

{
    "name": "BigViewModel",
    "version": "1.0.0",
    "summary": "A collection of Objective-C macros that provide convenience methods for observing model objects on views.",
    "description": "A BIG collection of Objective-C macros that provide convenience methods for observing model objects on views",
    "homepage": "https://github.com/bigworkindustries/BigViewModel",
    "license": "MIT",
    "authors": {
        "Vincil Bishop": "[email protected]"
    },
    "source": {
        "git": "https://github.com/bigworkindustries/BigViewModel.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*.{h,m}",
    "resource_bundles": {
        "BigViewModel": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This