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
def getPage(url): | |
d = Deferred() | |
# here it would set up an http client programmed to call | |
# d.callback(body) when page is fully received... | |
return d | |
def handleBody(body): | |
print body |
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 <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
- (void)exportAnimatedGif | |
{ | |
UIImage *shacho = [UIImage imageNamed:@"shacho.png"]; | |
UIImage *bucho = [UIImage imageNamed:@"bucho.jpeg"]; | |
NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"animated.gif"]; |