This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ci_service: travis_pro | |
| ci_access_token: coveralltoken | |
| coverage_service: coveralls | |
| xcodeproj: Project.xcodeproj | |
| source_directory: Project | |
| ignore: | |
| - ProjectTests/* | |
| - Pods/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| language: objective-c | |
| before_install: | |
| - gem install cocoapods --no-rdoc --no-ri --no-document --quiet | |
| - gem install slather --no-rdoc --no-ri --no-document --quiet | |
| - cd Project && pod install | |
| script: | |
| - xctool test -workspace Project.xcworkspace -scheme ProjectTests -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6' GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | |
| after_success: | |
| - cd $TRAVIS_BUILD_DIR && slather |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <RestKit/RestKit.h> | |
| #import "CoreData+MagicalRecord.h" | |
| // Use a class extension to expose access to MagicalRecord's private setter methods | |
| @interface NSManagedObjectContext () | |
| + (void)MR_setRootSavingContext:(NSManagedObjectContext *)context; | |
| + (void)MR_setDefaultContext:(NSManagedObjectContext *)moc; | |
| @end | |
| @implementation AppDelegate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void)layoutSubviews | |
| { | |
| [super layoutSubviews]; | |
| if (self.numberOfLines == 0 && self.preferredMaxLayoutWidth != CGRectGetWidth(self.frame)) { | |
| self.preferredMaxLayoutWidth = self.frame.size.width; | |
| [self setNeedsUpdateConstraints]; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CAGradientLayer *maskLayer = [CAGradientLayer layer]; | |
| CGColorRef outerColor = [UIColor colorWithWhite:1.0 alpha:0.0].CGColor; | |
| CGColorRef innerColor = [UIColor colorWithWhite:1.0 alpha:1.0].CGColor; | |
| maskLayer.colors = @[(__bridge id)outerColor, (__bridge id)innerColor]; | |
| maskLayer.locations = @[@0, @.05]; | |
| maskLayer.bounds = self.tableView.bounds; | |
| maskLayer.anchorPoint = CGPointZero; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defaults write ~/Library/Preferences/com.apple.iphonesimulator SimulatorWindowLastScale "0.4" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [[RACSignal merge:@[self.nameField.rac_textSignal, RACObserve(self.nameField, text)]] subscribeNext:^(NSString* text){ self.viewModel.name = text; }]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (instancetype)init | |
| { | |
| self = [super init]; | |
| if (self) { | |
| [self setOpaque:NO]; | |
| } | |
| return self; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (NSArray *)shuffle | |
| { | |
| NSUInteger count = [self count]; | |
| NSMutableArray *mutableArray = [NSMutableArray arrayWithArray:self]; | |
| for (NSUInteger i = 0; i < count; ++i) { | |
| NSInteger remainingCount = count - i; | |
| NSInteger exchangeIndex = i + arc4random_uniform((u_int32_t )remainingCount); | |
| [mutableArray exchangeObjectAtIndex:i withObjectAtIndex:exchangeIndex]; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (NSDictionary *)groupByKey:(NSString *)key | |
| { | |
| NSMutableDictionary *dictionary = [NSMutableDictionary dictionary]; | |
| for (id obj in self) { | |
| id keyValue = [obj valueForKey:key]; | |
| if (keyValue) { | |
| NSMutableArray *array = dictionary[keyValue]; | |
| if (!array) { | |
| array = [NSMutableArray array]; |