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
@interface UIImage (ObjColumnist) | |
- (void)updateWithSpecialScaling; | |
@end | |
@implementation UIImage (ObjColumnist) | |
- (void)updateWithAdjustedScaling |
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
#0 0x32a10960 in objc_exception_throw () | |
#1 0x3604bb3c in _PFFaultHandlerLookupRow () | |
#2 0x3604d0fe in _PF_FulfillDeferredFault () | |
#3 0x36054c10 in _PF_ManagedObject_WillChangeValueForKeyIndex () | |
#4 0x3605f332 in _sharedIMPL_setvfk_core () | |
#5 0x0009c4f2 in __block_global_0 at /Users/Jonathan/Projects/matchbox_ios/matchbox/matchbox/MBUser.m:60 | |
#6 0x36068bc0 in developerSubmittedBlockToNSManagedObjectContextPerform () | |
#7 0x333f04b6 in _dispatch_client_callout () | |
#8 0x333f51bc in _dispatch_main_queue_callback_4CF$VARIANT$mp () | |
#9 0x346d3f3a in __CFRunLoopRun () |
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)scrollViewDidScroll:(UIScrollView *)scrollView | |
{ | |
CGPoint contentOffset = scrollView.contentOffset; | |
UIView *header = self.tableView.tableHeaderView; | |
if (contentOffset.y <= 0.0f) { | |
header.frame = CGRectMake(CGRectGetMinX(header.frame), contentOffset.y, CGRectGetWidth(header.frame), CFY_DISCOVER_TABLE_HEADER_MIN_HEIGHT - contentOffset.y); | |
[self.mapView setCenterCoordinate:self.mapView.userLocation.coordinate animated:NO]; | |
} else { | |
header.frame = CGRectMake(CGRectGetMinX(header.frame), 0.0f, CGRectGetWidth(header.frame), CFY_DISCOVER_TABLE_HEADER_MIN_HEIGHT); | |
} |
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
@interface CFYActivity : NSManagedObject | |
@property (nonatomic, strong) NSNumber * activityID; | |
@property (nonatomic, strong) NSNumber * type; | |
@property (nonatomic, strong) NSDate * date; | |
@property (nonatomic, strong) NSNumber * amount; | |
@property (nonatomic, strong) NSString * activityDescription; | |
@property (nonatomic, strong) NSNumber * rewardID; | |
@property (nonatomic, strong) CFYChain *chain; |
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)animatePhotosIn | |
{ | |
CAKeyframeAnimation *userPhotoAnim = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; | |
userPhotoAnim.values = [self photoTransformValuesWithMultiplier:1.0]; | |
CAKeyframeAnimation *matchPhotoAnim = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; | |
matchPhotoAnim.values = [self photoTransformValuesWithMultiplier:-1.0]; | |
NSArray *photoAnims = [NSArray arrayWithObjects:userPhotoAnim, matchPhotoAnim, nil]; | |
for (CAKeyframeAnimation *photoAnim in photoAnims) { | |
photoAnim.calculationMode = kCAAnimationCubic; |
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
// I take a string from a text field (which includes emoji) and apply this to it so that my JSON parser doesn't freak out when it comes back to me. | |
NSData *stringData = [message dataUsingEncoding:NSNonLossyASCIIStringEncoding]; | |
NSString *safeString = [[NSString alloc] initWithData:stringData encoding:NSUTF8StringEncoding]; | |
// I try to draw the string I get back from the server (I sent it safeString from above). | |
// When I draw it I end up getting text like this drawn: | |
// Test emoji \ud83d\ude03 |
NewerOlder