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) fadeOutShadowsSuchThatReinerWontNotice | |
{ | |
NSDateFormatter *df = [[NSDateFormatter alloc] init]; | |
[df setDateFormat:@"yyyy-MM-dd HH:mm:ss zzz"]; | |
NSDate *fadeOutStartDate = [df dateFromString:@"2013-01-21 15:00:00 +0100"]; | |
NSDate *fadeOutEndDate = [df dateFromString:@"2013-01-25 18:00:00 +0100"]; | |
NSDate *now = [NSDate date]; | |
float blendValue = (now.timeIntervalSince1970 - fadeOutStartDate.timeIntervalSince1970) / | |
(fadeOutEndDate.timeIntervalSince1970 - fadeOutStartDate.timeIntervalSince1970); |
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
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ | |
UIImage* image = [UIImage imageWithContentsOfFile:...]; | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
self.targetImageView.image = image; | |
}); | |
}); |