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
NSSet *waitingTemp = [self.waitingObjects copy]; | |
for (NSManagedObject *object in waitingTemp) | |
{ | |
if (! [object hasDependencies]) | |
{ | |
__weak typeof (self) weakSelf = self; | |
[self.waitingObjects removeObject:object]; | |
[self.dispatchedObjects addObject:object]; | |
[SBManagedObjectHelper saveObject:object | |
syncToServer:YES |
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)setDelegate:(id<UINavigationControllerDelegate>)delegate | |
{ | |
[NSException raise:@"Wrong delegate error" format:@"You're actually using this? 99% sure you meant mailComposerDelegate"]; | |
} |
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
/// .h | |
@interface mySingleton : NSObject | |
@property (nonatomic, strong) id someData; | |
+ (id)sharedInstance; | |
+ (void)probablySuperfluousStartup; | |
+ (void)probablyUnnecessaryShutdown; | |
@end | |
/// .m | |
static mySingleton *sharedInstance; |
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
#import "CBKClassToChange.h" | |
@implementation CBKClassToChange | |
+ (void)load | |
{ | |
[NSKeyedUnarchiver setClass:self forClassName:@"CBClassToChange"]; | |
} | |
- (void)encodeWithCoder:(NSCoder *)aCoder |
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)typeButtonTap:(id)sender | |
{ | |
UITableViewCell *cell = (UITableViewCell *)sender; | |
NSIndexPath *path = [self.tableView indexPathForCell:cell]; | |
ESCContactEditViewModelBase *viewModel = [self viewModelForIndexPath:path]; | |
[self displayTypeSelectorForViewModel:viewModel]; | |
} |
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)willSave | |
+{ | |
+ static const unichar kUnicharMax = USHRT_MAX; | |
+ NSString *heavyString = [NSString stringWithCharacters:&kUnicharMax length:1]; | |
+ | |
+ self.firstNameSortValue = [self.firstName length] ? self.firstName : heavyString; | |
+ self.lastNameSortValue = [self.lastName length] ? self.lastName : heavyString; | |
+ self.companySortValue = [self.company length] ? self.company : heavyString; | |
+} |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
var f_var: () -> String = { | |
return "Wat" | |
} | |
let f1: () -> String = { | |
return "Indubitably" |
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
Message: 11 | |
Date: Fri, 1 Jan 2016 14:21:35 -0800 | |
From: Ethan Diamond <edgewood7558@gmail.com> | |
To: Chris Lattner <clattner@apple.com> | |
Cc: swift-evolution@swift.org | |
Subject: Re: [swift-evolution] Closure Syntax | |
Message-ID: | |
<CA+TuH2kozmhFMVKWrjMarc0C9B_Z2mCB=D+GZ10=BC=Kj1fFLA@mail.gmail.com> | |
Content-Type: text/plain; charset="utf-8" |
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
class ThingManager { | |
var things: [String: Thing] = [:] | |
func addThing(_ thing: Thing) { | |
self.things[thing.address] = thing | |
} | |
func removeThingWith(address: String) { | |
self.things.removeValue(forKey: address) |
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
[{"value":"Exported from Microsoft Outlook (Do not delete)\n[outlook:3:1131] \n\nExported from Microsoft Outlook (Do not delete)\n[outlook:3:1131]\n\nExported from Microsoft Outlook (Do not delete)\n[outlook:3:1131] \n\nExported from Microsoft Outlook (Do not delete)\n[outlook:3:1131] \n\nExported from Microsoft Outlook (Do not delete)\n[outlook:3:1131]\n\nExported from Microsoft Outlook (Do not delete)\n[outlook:3:1131]\n\nExported from Microsoft Outlook (Do not delete)\n[outlook:3:1131] \n\nExported from Microsoft Outlook (Do not delete)\n[outlook:3:1131] \n\nExported from Microsoft Outlook (Do not delete)\n[outlook:3:1131]\n\nExported from Microsoft Outlook (Do not delete)\n[outlook:3:1131] \n\nExported from Microsoft Outlook (Do not delete)\n[outlook:3:1131] \n\nExported from Microsoft Outlook (Do not delete)\n[outlook:3:1131]\n\nExported from Microsoft Outlook (Do not delete)\n[outlook:3:1131]\n\nExported from Microsoft Outlook (Do not delete)\n[outlook:3:1131]\n\nExported from Microsoft Outlook (Do not |
OlderNewer