This file contains 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
RKEntityMapping* listMapping = [RKEntityMapping mappingForEntityForName:[FOFSList entityName] inManagedObjectStore:objectManager.managedObjectStore]; | |
[listMapping addAttributeMappingsFromDictionary:@{ | |
@"id": @"listID", | |
@"title": @"name", | |
@"description": @"desc", | |
@"user": @"user", | |
@"following": @"following", | |
// @"editable": @"editable", | |
@"collaborative": @"collaborative", | |
@"canonicalUrl": @"canonicalUrl", |
This file contains 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
RKObjectManager* objectManager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"https://api.foursquare.com/"]]; | |
objectManager.managedObjectStore = [self managedObjectStore]; | |
RKEntityMapping* listMapping = [RKEntityMapping mappingForEntityForName:[FOFSList entityName] inManagedObjectStore:objectManager.managedObjectStore]; | |
[listMapping addAttributeMappingsFromDictionary:@{ | |
@"id": @"listID", | |
@"title": @"name", | |
@"description": @"desc", | |
@"user": @"user", | |
@"following": @"following", |
This file contains 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
(lldb) po [[[error userInfo] objectForKey:@"NSDetailedErrors"] objectAtIndex:0] | |
Error Domain=NSCocoaErrorDomain Code=1570 "The operation couldn’t be completed. (Cocoa error 1570.)" UserInfo=0x1201e290 {NSValidationErrorObject=<FOFSList: 0xf2357f0> (entity: FOFSList; id: 0x120939b0 <x-coredata://6D8CBDDD-DFD9-4463-9305-52EA03846EEE/FOFSList/p5> ; data: { | |
canonicalUrl = nil; | |
collaborative = nil; | |
collaborators = ( | |
); | |
desc = nil; | |
editable = nil; | |
followers = ( | |
); |
This file contains 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
[UIView animateKeyframesWithDuration:0.5 delay:0 options:UIViewKeyframeAnimationOptionCalculationModeLinear animations:^ | |
{ | |
CGRect newFrame = self.view.bounds; | |
newFrame.origin.y = newFrame.size.height; | |
[webView setFrame:newFrame]; | |
} | |
completion:^(BOOL finished) | |
{ | |
}]; |
This file contains 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
RKEntityMapping* listMapping = [RKEntityMapping mappingForEntityForName:[FOFSList entityName] | |
inManagedObjectStore:objectManager.managedObjectStore]; | |
[listMapping addAttributeMappingsFromDictionary:@{ | |
@"id": @"listID", | |
@"title": @"name", | |
@"description": @"desc", | |
@"user": @"user", | |
@"following": @"following", | |
@"collaborative": @"collaborative", | |
@"canonicalUrl": @"canonicalUrl", |
This file contains 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
"SEARCHRESULTSTHATMATCHYOURPINS" = "Search results that match your pins:"; | |
"SEARCHRESULTSINTHISMAPAREA" = "Search results in this map area:"; | |
"SEARCHADIFFERENTLOCATION" = "Search a different location?"; | |
"SEARCHLIST" = "Search List"; | |
"SEARCHBAR" = "Search Bar"; | |
// General | |
"OKTEXT" = "Ok"; | |
"CANCELTEXT" = "Cancel"; | |
"EDITTEXT" = "Edit"; |
This file contains 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
DeviceSettingsHeaderView *headerView = [[DeviceSettingsHeaderView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.tableView.bounds.size.width, DEVICE_HEADER_HEIGHT)]; | |
+ | |
+ [RACObserve(self, device) subscribeNext:^(MorseDevice *newDevice) { | |
+ | |
+ // When the battery level changes, update the string | |
+ RACSignal *batteryChangeSignal = RACObserve(newDevice, batteryLevel); | |
+ RAC(headerView.batteryAndWifiLabel, text) = [[batteryChangeSignal deliverOn:[RACScheduler mainThreadScheduler]] map:^id(id value) { | |
+ | |
+ return [NSString stringWithFormat:@"%@ %@", NSLocalizedString(@"battery is at", nil), newDevice.batteryLevelString]; | |
+ }]; |
This file contains 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)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
DeviceSettingsHeaderView *headerView = [[DeviceSettingsHeaderView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.tableView.bounds.size.width, DEVICE_HEADER_HEIGHT)]; | |
[RACObserve(self, device) subscribeNext:^(MorseDevice *newDevice) { | |
// When the battery level changes, update the string | |
RACSignal *batteryChangeSignal = RACObserve(newDevice, batteryLevel); |
This file contains 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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
... | |
... | |
// When the gain changes | |
RACSignal *gainChangeSignal = [RACObserve(self, device.gain) deliverOn:[RACScheduler mainThreadScheduler]]; | |
// cell.auxiliaryLabel.text = @" "; | |
RAC(cell.auxiliaryLabel, text) = [gainChangeSignal map:^id(id value) { | |
// Get the gain lookup table | |
NSString *rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, |
This file contains 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
UIView *wrapper = [UIView autoLayoutView]; | |
[wrapper constrainToWidth:300]; | |
self.textSubtextPairs = @[@{@"label": @"abcde", | |
@"detail": @"Bacon ipsum dolor sit amet sausage shank ball tip jowl shoulder spare ribs prosciutto leberkas sirloin pork cow bacon beef. Bacon drumstick tongue shank. Pancetta ribeye doner andouille tri-tip sirloin t-bone tenderloin sausage bacon. Ball tip salami pig frankfurter bacon meatloaf turkey ribeye boudin t-bone corned beef short ribs short loin tongue tenderloin. Meatball turducken swine kielbasa rump prosciutto doner, short ribs boudin shankle jowl shank pig short loin. Prosciutto drumstick pork belly shank meatball. Jowl frankfurter swine, spare ribs landjaeger strip steak flank t-bone ribeye ground round meatball kevin boudin leberkas.", | |
@"color" : [UIColor redColor]}, | |
@{@"label": @"cdef", | |
@"deta |