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)pauseLayer:(CALayer*)layer | |
| { | |
| CFTimeInterval pausedTime = [layer convertTime:CACurrentMediaTime() fromLayer:nil]; | |
| layer.speed = 0.0; | |
| layer.timeOffset = pausedTime; | |
| } | |
| -(void)resumeLayer:(CALayer*)layer | |
| { | |
| CFTimeInterval pausedTime = [layer timeOffset]; |
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
| #import <Foundation/Foundation.h> | |
| typedef void (^OnDocumentReady) (UIManagedDocument *document); | |
| @interface MYDocumentHandler : NSObject | |
| @property (strong, nonatomic) UIManagedDocument *document; | |
| + (MYDocumentHandler *)sharedDocumentHandler; | |
| - (void)performWithDocument:(OnDocumentReady)onDocumentReady; |
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
| // in application:didFinishLaunchingWithOptions: in app delegate | |
| // before [window makeKeyAndVisible]; | |
| int height; | |
| NSString *imageName; | |
| CGRect screenBounds = [[UIScreen mainScreen] bounds]; | |
| if (screenBounds.size.height == 480) { | |
| height = 480; | |
| imageName = @"Default.png"; | |
| } else { |