TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Karolis Stasaitis.
Depends on: | |
ReactiveCocoa | >= 0 |
ReactiveViewModel | >= 0 |
A MVVM framework based on ReactiveCocoa and built with a goal to sepparate untestable UIKit view logic from testable business logic.
Well it's pretty simple:
@interface MYViewModel : IOTableViewModel
@interface MYViewController : IOTableViewController
- (void)pre
{
[super pre];
//This is where all the things prior to initializing the view go.
//For example:
[self rac_signalForSelector:@selector(scrollViewDidScroll:)
fromProtocol:@protocol(UIScrollViewDelegate)];
}
- (void)setupViews
{
[super setupViews];
//Here we set up our view like we do on viewDidLoad. For example:
[self.view addSubview:self.doneButton];
}
- (void)post
{
[super post];
//After we setup the views, we want to bind our view model against
//them, this is where all that magic goes. For example:
RAC(self.doneButton, userInteractionEnabled) =
RACObserve(self.viewModel, doneEnabled);
}
MYViewModel *vm = [[MYViewModel alloc] init];
MYViewController *vc = [[MYViewController alloc] initWithViewModel:vm];
rprtr should be a good resource, this project was developed against it.
You can build it as a regular framework, but I recommend using CocoaPods:
pod 'iodine'