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)drawLinesInRect:(CGRect)rect forFont:(UIFont *)font | |
{ | |
CGFloat maxLineHeight = 30.0f; | |
CGFloat fontLineHeight = roundf(font.lineHeight); | |
CGFloat fontBaselineAdjustment = roundf(-font.descender); | |
CGFloat startY = fmodf(yOffset, fontLineHeight); | |
CGFloat totalDrawnLines = (int)(floorf(CGRectGetHeight(rect) / fontLineHeight)); | |
for (NSUInteger drawnLine = 0; drawnLine < totalDrawnLines; drawnLine++) { |
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
[[FBSession activeSession] closeAndClearTokenInformation]; | |
if (NSClassFromString(@"ACAccountStore")) { | |
ACAccountStore *accountStore = [[ACAccountStore alloc] init]; | |
if ([accountStore respondsToSelector:NSSelectorFromString(@"ACAccountStoreRemoveCompletionHandler")]) { | |
ACAccountType *fbType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; | |
NSArray *accounts = [accountStore accountsWithAccountType:fbType]; | |
ACAccount *account = [accounts lastObject]; | |
if (account) { | |
[accountStore renewCredentialsForAccount:account completion:^(ACAccountCredentialRenewResult renewResult, NSError *error) { |
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
"match.matchID == $FETCH_SOURCE.matchID && viewed == NO". | |
-------------------MODEL DETAILS --------------------- | |
Match (entity) | |
messages (to-many relationship with Message entity) | |
viewed (boolean attribute) | |
matchID (string attribute) | |
unviewedMessages (fetched property with - see above) | |
PREDICATE = "match.matchID == $FETCH_SOURCE.matchID && viewed == NO" |
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
[MagicalRecord saveWithBlock:^(NSManagedObjectContext *localContext) { | |
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"match == nil && failedChoice == NO"]; | |
NSArray *users = [TNDRUser MR_findAllWithPredicate:predicate inContext:localContext]; | |
for (TNDRUser *user in users) { | |
[user MR_deleteEntity]; | |
} | |
} completion:nil]; |
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)managedObjectContextDidChange:(NSNotification *)note | |
{ | |
NSArray *updatedObjects = [note userInfo][NSUpdatedObjectsKey]; | |
if ([updatedObjects containsObject:self.user]) { | |
[self updateView:YES]; | |
} | |
} |
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
A Call for Tinder | |
We at Tinder are looking to hire | |
Some fresh cool coals to fuel our fire. | |
That lump given proper compression, | |
a clear diamond revealed might make an impression. | |
A bit about us | |
As evidenced thus | |
The way that we roll |
OlderNewer