Mantle makes it easy to write a simple model layer for your Cocoa or Cocoa Touch application.
To start building the framework, clone this repository and then run script/bootstrap.
This will automatically pull down any dependencies.
| Running 136 tests: | |
| ........................................................................................................................................ | |
| # ----- XCode (OCUnit) Test Output -------------------- | |
| Test Case '-[AsyncSpecTest testAsyncSpec]' started. | |
| Test Case '-[AsyncSpecTest testAsyncSpec]' passed (0.036 seconds). | |
| Test Case '-[AsyncSpecTest2 testBeforeAllAndAfterAllHooks]' started. | |
| Test Case '-[AsyncSpecTest2 testBeforeAllAndAfterAllHooks]' passed (0.000 seconds). |
| // MTLManagedObjectAdapter.m | |
| - (NSPredicate *)uniquingPredicateForModel:(MTLModel<MTLManagedObjectSerializing> *)model { | |
| NSSet *propertyKeys = nil; | |
| if ([self.modelClass respondsToSelector:@selector(propertyKeysForManagedObjectUniquing)]) { | |
| propertyKeys = [self.modelClass propertyKeysForManagedObjectUniquing]; | |
| } | |
| NSPredicate *predicate = nil; | |
| for (NSString *propertyKey in propertyKeys) { |
| Pod::Spec.new do |s| | |
| s.name = "ReactiveCocoa" | |
| s.version = "2.0.0rc3" | |
| s.summary = "A framework for composing and transforming sequences of values." | |
| s.homepage = "https://github.com/blog/1107-reactivecocoa-is-now-open-source" | |
| s.author = { "Josh Abernathy" => "[email protected]" } | |
| s.source = { :git => "https://github.com/ReactiveCocoa/ReactiveCocoa.git", :tag => 'v2.0-RC3' } | |
| s.license = 'Simplified BSD License' | |
| s.description = "ReactiveCocoa offers:\n" \ | |
| "1. The ability to compose operations on future data.\n" \ |
| // | |
| // Example.m | |
| // Partial | |
| // | |
| // Created by Robert Böhnke on 5/23/13. | |
| // Copyright (c) 2013 Robert Böhnke. All rights reserved. | |
| // | |
| #import "Partial.h" |
| #define SHARED_INSTANCE(EXPR) \ | |
| ^(){ \ | |
| static typeof((EXPR)) instance; \ | |
| static dispatch_once_t onceToken; \ | |
| dispatch_once(&onceToken, ^{ \ | |
| instance = EXPR;\ | |
| });\ | |
| return instance;\ | |
| }() |
| typedef float float3 __attribute__((ext_vector_type(3))); | |
| - (void)test; | |
| { | |
| float3 a = {1, 2, 3}; | |
| a = 2.0f * a; | |
| NSLog(@"%f %f %f", a.x, a.y, a.z); | |
| } |
| STAssertEqualObjects(@[], | |
| @[], | |
| @"Works"); | |
| STAssertEqualObjects(@[@1], | |
| @[@1], | |
| @"Works"); | |
| STAssertEqualObjects(@[@1, @2, @3], | |
| @[@1, @2, @3], |