added pods to ignore

This commit is contained in:
Patrick Santana 2014-04-29 15:56:09 -03:00
parent 88d57eee64
commit c2575007e5
113 changed files with 9363 additions and 17226 deletions

8
.gitignore vendored
View file

@ -17,6 +17,10 @@ profile
DerivedData
.idea/
// private class
# private class
Photo/PrivateAuthenticationService.m
Photo/PrivateConstants.m
Photo/PrivateConstants.m
# cocoa Pods
Pods

27
.gitmodules vendored
View file

@ -1,27 +0,0 @@
[submodule "Frameworks/iRate"]
path = Frameworks/iRate
url = git://github.com/nicklockwood/iRate.git
[submodule "Frameworks/SDWebImage"]
path = Frameworks/SDWebImage
url = git://github.com/rs/SDWebImage.git
[submodule "Frameworks/ASIHTTPRequest"]
path = Frameworks/ASIHTTPRequest
url = git://github.com/pokeb/asi-http-request
[submodule "Frameworks/MBProgressHUD"]
path = Frameworks/MBProgressHUD
url = git://github.com/jdg/MBProgressHUD.git
[submodule "Frameworks/TSAlertView"]
path = Frameworks/TSAlertView
url = git://github.com/TomSwift/TSAlertView.git
[submodule "Frameworks/json-framework"]
path = Frameworks/json-framework
url = git://github.com/stig/json-framework.git
[submodule "Frameworks/ShareKit"]
path = Frameworks/ShareKit
url = git://github.com/ShareKit/ShareKit.git
[submodule "Frameworks/TMQuiltView"]
path = Frameworks/TMQuiltView
url = git://github.com/1000Memories/TMQuiltView.git
[submodule "Frameworks/DLCImagePickerController"]
path = Frameworks/DLCImagePickerController
url = git@github.com:nicnocquee/DLCImagePickerController.git

View file

@ -1,8 +1,5 @@
platform :ios, '7.0'
platform :ios, '7.1'
#TSAlertView
#pod 'DLCImagePickerController', '~> 0.0.1'
pod 'SBJson', '~> 3.2'
pod 'GoogleAnalytics-iOS-SDK', '~> 3.0.3'
pod 'SDWebImage','~> 3.5.2'
@ -13,4 +10,7 @@ pod 'ASIHTTPRequest', '~> 1.8.1'
pod 'iRate', '~> 1.9.2'
pod 'ViewDeck', '~> 2.3.1'
pod 'TMQuiltView', '~> 0.0.1'
#pod 'DLCImagePickerController', '~> 0.0.1'
#pod 'ShareKit', '~> 2.5.3'

View file

@ -1,24 +1,26 @@
PODS:
- ASIHTTPRequest (1.8.1):
- ASIHTTPRequest (1.8.2):
- ASIHTTPRequest/ASIWebPageRequest
- ASIHTTPRequest/CloudFiles
- ASIHTTPRequest/Core
- ASIHTTPRequest/S3
- ASIHTTPRequest/ASIWebPageRequest (1.8.2):
- ASIHTTPRequest/Core
- ASIHTTPRequest/CloudFiles (1.8.2):
- ASIHTTPRequest/Core
- ASIHTTPRequest/Core (1.8.2):
- Reachability
- ASIHTTPRequest/ASIWebPageRequest (1.8.1):
- Reachability
- ASIHTTPRequest/CloudFiles (1.8.1):
- Reachability
- ASIHTTPRequest/S3 (1.8.1):
- Reachability
- GoogleAnalytics-iOS-SDK (3.0.3)
- InAppSettingsKit (2.0)
- iRate (1.9.2)
- ASIHTTPRequest/S3 (1.8.2):
- ASIHTTPRequest/Core
- GoogleAnalytics-iOS-SDK (3.0.6)
- InAppSettingsKit (2.0.1)
- iRate (1.9.3)
- MBProgressHUD (0.8)
- Reachability (3.1.1)
- SBJson (3.2)
- SDWebImage (3.5.2):
- SDWebImage (3.5.4):
- SDWebImage/Core
- SDWebImage/Core (3.5.2)
- SDWebImage/Core (3.5.4)
- TMQuiltView (0.0.1)
- ViewDeck (2.3.1)
@ -35,14 +37,14 @@ DEPENDENCIES:
- ViewDeck (~> 2.3.1)
SPEC CHECKSUMS:
ASIHTTPRequest: 162783e0cd71bdd3ff1ceed0cd5fa9505e0116a8
GoogleAnalytics-iOS-SDK: 7b0e55cfe5e70d60478a7b105f15ac71e8bc373e
InAppSettingsKit: 2b85ba925a81634860461c21274f54b130c84614
iRate: 7c4bc22ab4a8752185d84bed7a98dc111c8212a5
ASIHTTPRequest: 4bd3ed65bf8a726292c5fa79ea5c0a2e02c97241
GoogleAnalytics-iOS-SDK: c135fb62b1e5aa003b7be97b656ccee212896cf7
InAppSettingsKit: 5e42f626b9be9c33e3b04c0cc9523ca5eabe7ad3
iRate: 99aef520b335a1eb4a14a8d9ba5e8db4e1d95bbe
MBProgressHUD: 2bbc6f470111daf7f3eaa4eb12b8cbf01c4c0622
Reachability: be4883bb93f31e38266ae3365e5600a317aae735
SBJson: abc2bf2baef456d5dae213f9826fe2b6fdf19861
SDWebImage: fe7ce01ae4e0a884d168f59c9dd82d35baf8429e
SDWebImage: 1a62010700adbba823b621fc217906739dbf6aa5
TMQuiltView: 520d09d6a98f1a6aa75ed92a91123ecc79bab62c
ViewDeck: 2cdc67c4b41a10cafc7556b982f028409e33604d

View file

@ -133,7 +133,7 @@ static const NSUInteger kDomainSection = 1;
{
[self showTitle];
UIInterfaceOrientation o = [[UIApplication sharedApplication] statusBarOrientation];
UIInterfaceOrientation o = (UIInterfaceOrientation)[[UIApplication sharedApplication] statusBarOrientation];
CGFloat angle = 0;
switch (o) {
case UIDeviceOrientationLandscapeLeft: angle = 90; break;
@ -216,7 +216,20 @@ static const NSUInteger kDomainSection = 1;
+ (void)dismiss
{
[[sharedDialog parentViewController] dismissModalViewControllerAnimated:YES];
UIViewController* dismisser = nil;
if ([sharedDialog respondsToSelector:@selector(presentingViewController)]){
dismisser = [sharedDialog presentingViewController];
}else{
dismisser = [sharedDialog parentViewController];
}
if([dismisser respondsToSelector:@selector(dismissViewControllerAnimated:completion:)]){
[dismisser dismissViewControllerAnimated:YES completion:nil];
}else{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[dismisser dismissModalViewControllerAnimated:YES];
#pragma clang diagnostic pop
}
}
- (void)viewDidDisappear:(BOOL)animated
@ -233,7 +246,20 @@ static const NSUInteger kDomainSection = 1;
if (self == sharedDialog) {
[[self class] dismiss];
} else {
[[self parentViewController] dismissModalViewControllerAnimated:YES];
UIViewController* dismisser = nil;
if ([self respondsToSelector:@selector(presentingViewController)]){
dismisser = [self presentingViewController];
}else{
dismisser = [self parentViewController];
}
if([dismisser respondsToSelector:@selector(dismissViewControllerAnimated:completion:)]){
[dismisser dismissViewControllerAnimated:YES completion:nil];
}else{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[dismisser dismissModalViewControllerAnimated:YES];
#pragma clang diagnostic pop
}
}
}
@ -309,7 +335,14 @@ static const NSUInteger kDomainSection = 1;
}
#endif
[[self presentingController] presentModalViewController:self animated:YES];
if([[self presentingController] respondsToSelector:@selector(presentViewController:animated:completion:)]){
[[self presentingController] presentViewController:self animated:YES completion:nil];
}else{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[[self presentingController] presentModalViewController:self animated:YES];
#pragma clang diagnostic pop
}
}
#pragma mark button callbacks

View file

@ -88,7 +88,7 @@
[outputData increaseLengthBy:halfLength];
}
zStream.next_out = [outputData mutableBytes] + zStream.total_out-bytesProcessedAlready;
zStream.next_out = (Bytef*)[outputData mutableBytes] + zStream.total_out-bytesProcessedAlready;
zStream.avail_out = (unsigned int)([outputData length] - (zStream.total_out-bytesProcessedAlready));
status = deflate(&zStream, shouldFinish ? Z_FINISH : Z_NO_FLUSH);
@ -161,7 +161,7 @@
readLength = [inputStream read:inputData maxLength:DATA_CHUNK_SIZE];
// Make sure nothing went wrong
if ([inputStream streamStatus] == NSStreamEventErrorOccurred) {
if ([inputStream streamStatus] == NSStreamStatusError) {
if (err) {
*err = [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Compression of %@ failed because we were unable to read from the source data file",sourcePath],NSLocalizedDescriptionKey,[inputStream streamError],NSUnderlyingErrorKey,nil]];
}
@ -184,12 +184,12 @@
}
// Write the deflated data out to the destination file
[outputStream write:[outputData bytes] maxLength:[outputData length]];
[outputStream write:(const uint8_t *)[outputData bytes] maxLength:[outputData length]];
// Make sure nothing went wrong
if ([inputStream streamStatus] == NSStreamEventErrorOccurred) {
if ([inputStream streamStatus] == NSStreamStatusError) {
if (err) {
*err = [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Compression of %@ failed because we were unable to write to the destination data file at &@",sourcePath,destinationPath],NSLocalizedDescriptionKey,[outputStream streamError],NSUnderlyingErrorKey,nil]];
*err = [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Compression of %@ failed because we were unable to write to the destination data file at %@",sourcePath,destinationPath],NSLocalizedDescriptionKey,[outputStream streamError],NSUnderlyingErrorKey,nil]];
}
[compressor closeStream];
return NO;
@ -212,7 +212,7 @@
+ (NSError *)deflateErrorWithCode:(int)code
{
return [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Compression of data failed with code %hi",code],NSLocalizedDescriptionKey,nil]];
return [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Compression of data failed with code %d",code],NSLocalizedDescriptionKey,nil]];
}
@synthesize streamReady;

View file

@ -85,7 +85,7 @@
[outputData increaseLengthBy:halfLength];
}
zStream.next_out = [outputData mutableBytes] + zStream.total_out-bytesProcessedAlready;
zStream.next_out = (Bytef*)[outputData mutableBytes] + zStream.total_out-bytesProcessedAlready;
zStream.avail_out = (unsigned int)([outputData length] - (zStream.total_out-bytesProcessedAlready));
status = inflate(&zStream, Z_NO_FLUSH);
@ -158,7 +158,7 @@
readLength = [inputStream read:inputData maxLength:DATA_CHUNK_SIZE];
// Make sure nothing went wrong
if ([inputStream streamStatus] == NSStreamEventErrorOccurred) {
if ([inputStream streamStatus] == NSStreamStatusError) {
if (err) {
*err = [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Decompression of %@ failed because we were unable to read from the source data file",sourcePath],NSLocalizedDescriptionKey,[inputStream streamError],NSUnderlyingErrorKey,nil]];
}
@ -181,12 +181,12 @@
}
// Write the inflated data out to the destination file
[outputStream write:[outputData bytes] maxLength:[outputData length]];
[outputStream write:(Bytef*)[outputData bytes] maxLength:[outputData length]];
// Make sure nothing went wrong
if ([inputStream streamStatus] == NSStreamEventErrorOccurred) {
if ([inputStream streamStatus] == NSStreamStatusError) {
if (err) {
*err = [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Decompression of %@ failed because we were unable to write to the destination data file at &@",sourcePath,destinationPath],NSLocalizedDescriptionKey,[outputStream streamError],NSUnderlyingErrorKey,nil]];
*err = [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Decompression of %@ failed because we were unable to write to the destination data file at %@",sourcePath,destinationPath],NSLocalizedDescriptionKey,[outputStream streamError],NSUnderlyingErrorKey,nil]];
}
[decompressor closeStream];
return NO;
@ -211,7 +211,7 @@
+ (NSError *)inflateErrorWithCode:(int)code
{
return [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Decompression of data failed with code %hi",code],NSLocalizedDescriptionKey,nil]];
return [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Decompression of data failed with code %d",code],NSLocalizedDescriptionKey,nil]];
}
@synthesize streamReady;

View file

@ -35,6 +35,10 @@
// A helper function that determines if the server has requested data should not be cached by looking at the request's response headers
+ (BOOL)serverAllowsResponseCachingForRequest:(ASIHTTPRequest *)request;
// A list of file extensions that we know won't be readable by a webview when accessed locally
// If we're asking for a path to cache a particular url and it has one of these extensions, we change it to '.html'
+ (NSArray *)fileExtensionsToHandleAsHTML;
@property (assign, nonatomic) ASICachePolicy defaultCachePolicy;
@property (retain, nonatomic) NSString *storagePath;
@property (retain) NSRecursiveLock *accessLock;

View file

@ -14,6 +14,7 @@ static ASIDownloadCache *sharedCache = nil;
static NSString *sessionCacheFolder = @"SessionStore";
static NSString *permanentCacheFolder = @"PermanentStore";
static NSArray *fileExtensionsToHandleAsHTML = nil;
@interface ASIDownloadCache ()
+ (NSString *)keyForURL:(NSURL *)url;
@ -22,6 +23,15 @@ static NSString *permanentCacheFolder = @"PermanentStore";
@implementation ASIDownloadCache
+ (void)initialize
{
if (self == [ASIDownloadCache class]) {
// Obviously this is not an exhaustive list, but hopefully these are the most commonly used and this will 'just work' for the widest range of people
// I imagine many web developers probably use url rewriting anyway
fileExtensionsToHandleAsHTML = [[NSArray alloc] initWithObjects:@"asp",@"aspx",@"jsp",@"php",@"rb",@"py",@"pl",@"cgi", nil];
}
}
- (id)init
{
self = [super init];
@ -34,9 +44,12 @@ static NSString *permanentCacheFolder = @"PermanentStore";
+ (id)sharedCache
{
if (!sharedCache) {
sharedCache = [[self alloc] init];
[sharedCache setStoragePath:[[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:@"ASIHTTPRequestCache"]];
@synchronized(self) {
if (!sharedCache) {
sharedCache = [[self alloc] init];
[sharedCache setStoragePath:[[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:@"ASIHTTPRequestCache"]];
}
}
}
return sharedCache;
}
@ -102,31 +115,7 @@ static NSString *permanentCacheFolder = @"PermanentStore";
- (NSDate *)expiryDateForRequest:(ASIHTTPRequest *)request maxAge:(NSTimeInterval)maxAge
{
NSMutableDictionary *responseHeaders = [NSMutableDictionary dictionaryWithDictionary:[request responseHeaders]];
// If we weren't given a custom max-age, lets look for one in the response headers
if (!maxAge) {
NSString *cacheControl = [[responseHeaders objectForKey:@"Cache-Control"] lowercaseString];
if (cacheControl) {
NSScanner *scanner = [NSScanner scannerWithString:cacheControl];
[scanner scanUpToString:@"max-age" intoString:NULL];
if ([scanner scanString:@"max-age" intoString:NULL]) {
[scanner scanString:@"=" intoString:NULL];
[scanner scanDouble:&maxAge];
}
}
}
// RFC 2612 says max-age must override any Expires header
if (maxAge) {
return [[NSDate date] addTimeInterval:maxAge];
} else {
NSString *expires = [responseHeaders objectForKey:@"Expires"];
if (expires) {
return [ASIHTTPRequest dateFromRFC1123String:expires];
}
}
return nil;
return [ASIHTTPRequest expiryDateForRequest:request maxAge:maxAge];
}
- (void)storeResponseForRequest:(ASIHTTPRequest *)request maxAge:(NSTimeInterval)maxAge
@ -180,9 +169,14 @@ static NSString *permanentCacheFolder = @"PermanentStore";
if ([request responseData]) {
[[request responseData] writeToFile:dataPath atomically:NO];
} else if ([request downloadDestinationPath] && ![[request downloadDestinationPath] isEqualToString:dataPath]) {
} else if ([request downloadDestinationPath] && ![[request downloadDestinationPath] isEqualToString:dataPath]) {
NSError *error = nil;
[[[[NSFileManager alloc] init] autorelease] copyItemAtPath:[request downloadDestinationPath] toPath:dataPath error:&error];
NSFileManager* manager = [[NSFileManager alloc] init];
if ([manager fileExistsAtPath:dataPath]) {
[manager removeItemAtPath:dataPath error:&error];
}
[manager copyItemAtPath:[request downloadDestinationPath] toPath:dataPath error:&error];
[manager release];
}
[[self accessLock] unlock];
}
@ -209,12 +203,21 @@ static NSString *permanentCacheFolder = @"PermanentStore";
{
// Grab the file extension, if there is one. We do this so we can save the cached response with the same file extension - this is important if you want to display locally cached data in a web view
NSString *extension = [[url path] pathExtension];
if (![extension length]) {
// If the url doesn't have an extension, we'll add one so a webview can read it when locally cached
// If the url has the extension of a common web scripting language, we'll change the extension on the cached path to html for the same reason
if (![extension length] || [[[self class] fileExtensionsToHandleAsHTML] containsObject:[extension lowercaseString]]) {
extension = @"html";
}
return [self pathToFile:[[[self class] keyForURL:url] stringByAppendingPathExtension:extension]];
}
+ (NSArray *)fileExtensionsToHandleAsHTML
{
return fileExtensionsToHandleAsHTML;
}
- (NSString *)pathToCachedResponseHeadersForURL:(NSURL *)url
{
return [self pathToFile:[[[self class] keyForURL:url] stringByAppendingPathExtension:@"cachedheaders"]];
@ -259,7 +262,10 @@ static NSString *permanentCacheFolder = @"PermanentStore";
// Grab the file extension, if there is one. We do this so we can save the cached response with the same file extension - this is important if you want to display locally cached data in a web view
NSString *extension = [[[request url] path] pathExtension];
if (![extension length]) {
// If the url doesn't have an extension, we'll add one so a webview can read it when locally cached
// If the url has the extension of a common web scripting language, we'll change the extension on the cached path to html for the same reason
if (![extension length] || [[[self class] fileExtensionsToHandleAsHTML] containsObject:[extension lowercaseString]]) {
extension = @"html";
}
path = [path stringByAppendingPathComponent:[[[self class] keyForURL:[request url]] stringByAppendingPathExtension:extension]];
@ -435,15 +441,19 @@ static NSString *permanentCacheFolder = @"PermanentStore";
return YES;
}
// Borrowed from: http://stackoverflow.com/questions/652300/using-md5-hash-on-a-string-in-cocoa
+ (NSString *)keyForURL:(NSURL *)url
{
NSString *urlString = [url absoluteString];
if ([urlString length] == 0) {
return nil;
}
// Strip trailing slashes so http://allseeing-i.com/ASIHTTPRequest/ is cached the same as http://allseeing-i.com/ASIHTTPRequest
if ([[urlString substringFromIndex:[urlString length]-1] isEqualToString:@"/"]) {
urlString = [urlString substringToIndex:[urlString length]-1];
}
// Borrowed from: http://stackoverflow.com/questions/652300/using-md5-hash-on-a-string-in-cocoa
const char *cStr = [urlString UTF8String];
unsigned char result[16];
CC_MD5(cStr, (CC_LONG)strlen(cStr), result);

View file

@ -50,13 +50,13 @@ typedef enum _ASIPostFormat {
- (void)addFile:(NSString *)filePath forKey:(NSString *)key;
// Same as above, but you can specify the content-type and file name
- (void)addFile:(id)data withFileName:(NSString *)fileName andContentType:(NSString *)contentType forKey:(NSString *)key;
- (void)addFile:(NSString *)filePath withFileName:(NSString *)fileName andContentType:(NSString *)contentType forKey:(NSString *)key;
// Add the contents of a local file to the request, clearing any others with the same key
- (void)setFile:(NSString *)filePath forKey:(NSString *)key;
// Same as above, but you can specify the content-type and file name
- (void)setFile:(id)data withFileName:(NSString *)fileName andContentType:(NSString *)contentType forKey:(NSString *)key;
- (void)setFile:(NSString *)filePath withFileName:(NSString *)fileName andContentType:(NSString *)contentType forKey:(NSString *)key;
// Add the contents of an NSData object to the request
- (void)addData:(NSData *)data forKey:(NSString *)key;

View file

@ -30,7 +30,7 @@
#pragma mark utilities
- (NSString*)encodeURL:(NSString *)string
{
NSString *newString = NSMakeCollectable([(NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)string, NULL, CFSTR(":/?#[]@!$ &'()*+,;=\"<>%{}|\\^~`"), CFStringConvertNSStringEncodingToEncoding([self stringEncoding])) autorelease]);
NSString *newString = [NSMakeCollectable(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)string, NULL, CFSTR(":/?#[]@!$ &'()*+,;=\"<>%{}|\\^~`"), CFStringConvertNSStringEncodingToEncoding([self stringEncoding]))) autorelease];
if (newString) {
return newString;
}
@ -49,6 +49,7 @@
self = [super initWithURL:newURL];
[self setPostFormat:ASIURLEncodedPostFormat];
[self setStringEncoding:NSUTF8StringEncoding];
[self setRequestMethod:@"POST"];
return self;
}
@ -67,10 +68,16 @@
- (void)addPostValue:(id <NSObject>)value forKey:(NSString *)key
{
if (!key) {
return;
}
if (![self postData]) {
[self setPostData:[NSMutableArray array]];
}
[[self postData] addObject:[NSDictionary dictionaryWithObjectsAndKeys:[value description],@"value",key,@"key",nil]];
NSMutableDictionary *keyValuePair = [NSMutableDictionary dictionaryWithCapacity:2];
[keyValuePair setValue:key forKey:@"key"];
[keyValuePair setValue:[value description] forKey:@"value"];
[[self postData] addObject:keyValuePair];
}
- (void)setPostValue:(id <NSObject>)value forKey:(NSString *)key
@ -93,36 +100,26 @@
[self addFile:filePath withFileName:nil andContentType:nil forKey:key];
}
- (void)addFile:(id)data withFileName:(NSString *)fileName andContentType:(NSString *)contentType forKey:(NSString *)key
- (void)addFile:(NSString *)filePath withFileName:(NSString *)fileName andContentType:(NSString *)contentType forKey:(NSString *)key
{
if (![self fileData]) {
[self setFileData:[NSMutableArray array]];
BOOL isDirectory = NO;
BOOL fileExists = [[[[NSFileManager alloc] init] autorelease] fileExistsAtPath:filePath isDirectory:&isDirectory];
if (!fileExists || isDirectory) {
[self failWithError:[NSError errorWithDomain:NetworkRequestErrorDomain code:ASIInternalErrorWhileBuildingRequestType userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"No file exists at %@",filePath],NSLocalizedDescriptionKey,nil]]];
}
// If data is a path to a local file
if ([data isKindOfClass:[NSString class]]) {
BOOL isDirectory = NO;
BOOL fileExists = [[[[NSFileManager alloc] init] autorelease] fileExistsAtPath:(NSString *)data isDirectory:&isDirectory];
if (!fileExists || isDirectory) {
[self failWithError:[NSError errorWithDomain:NetworkRequestErrorDomain code:ASIInternalErrorWhileBuildingRequestType userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"No file exists at %@",data],NSLocalizedDescriptionKey,nil]]];
}
// If the caller didn't specify a custom file name, we'll use the file name of the file we were passed
if (!fileName) {
fileName = [(NSString *)data lastPathComponent];
}
// If we were given the path to a file, and the user didn't specify a mime type, we can detect it from the file extension
if (!contentType) {
contentType = [ASIHTTPRequest mimeTypeForFileAtPath:data];
}
// If the caller didn't specify a custom file name, we'll use the file name of the file we were passed
if (!fileName) {
fileName = [filePath lastPathComponent];
}
NSDictionary *fileInfo = [NSDictionary dictionaryWithObjectsAndKeys:data, @"data", contentType, @"contentType", fileName, @"fileName", key, @"key", nil];
[[self fileData] addObject:fileInfo];
// If we were given the path to a file, and the user didn't specify a mime type, we can detect it from the file extension
if (!contentType) {
contentType = [ASIHTTPRequest mimeTypeForFileAtPath:filePath];
}
[self addData:filePath withFileName:fileName andContentType:contentType forKey:key];
}
- (void)setFile:(NSString *)filePath forKey:(NSString *)key
{
[self setFile:filePath withFileName:nil andContentType:nil forKey:key];
@ -155,8 +152,13 @@
if (!contentType) {
contentType = @"application/octet-stream";
}
NSDictionary *fileInfo = [NSDictionary dictionaryWithObjectsAndKeys:data, @"data", contentType, @"contentType", fileName, @"fileName", key, @"key", nil];
NSMutableDictionary *fileInfo = [NSMutableDictionary dictionaryWithCapacity:4];
[fileInfo setValue:key forKey:@"key"];
[fileInfo setValue:fileName forKey:@"fileName"];
[fileInfo setValue:contentType forKey:@"contentType"];
[fileInfo setValue:data forKey:@"data"];
[[self fileData] addObject:fileInfo];
}
@ -206,7 +208,7 @@
[super buildPostBody];
#if DEBUG_FORM_DATA_REQUEST
NSLog(@"%@",[self debugBodyString]);
ASI_DEBUG_LOG(@"%@",[self debugBodyString]);
[self setDebugBodyString:nil];
#endif
}
@ -220,8 +222,11 @@
NSString *charset = (NSString *)CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding([self stringEncoding]));
// Set your own boundary string only if really obsessive. We don't bother to check if post data contains the boundary, since it's pretty unlikely that it does.
NSString *stringBoundary = @"0xKhTmLbOuNdArY";
// We don't bother to check if post data contains the boundary, since it's pretty unlikely that it does.
CFUUIDRef uuid = CFUUIDCreate(nil);
NSString *uuidString = [(NSString*)CFUUIDCreateString(nil, uuid) autorelease];
CFRelease(uuid);
NSString *stringBoundary = [NSString stringWithFormat:@"0xKhTmLbOuNdArY-%@",uuidString];
[self addRequestHeader:@"Content-Type" value:[NSString stringWithFormat:@"multipart/form-data; charset=%@; boundary=%@", charset, stringBoundary]];
@ -328,7 +333,9 @@
- (void)addToDebugBody:(NSString *)string
{
[self setDebugBodyString:[[self debugBodyString] stringByAppendingString:string]];
if (string) {
[self setDebugBodyString:[[self debugBodyString] stringByAppendingString:string]];
}
}
#endif

View file

@ -193,7 +193,7 @@ typedef void (^ASIDataBlock)(NSData *data);
NSString *password;
// User-Agent for this request
NSString *userAgent;
NSString *userAgentString;
// Domain used for NTLM authentication
NSString *domain;
@ -873,6 +873,11 @@ typedef void (^ASIDataBlock)(NSData *data);
// And also by ASIS3Request
+ (NSString *)base64forData:(NSData *)theData;
// Returns the expiration date for the request.
// Calculated from the Expires response header property, unless maxAge is non-zero or
// there exists a non-zero max-age property in the Cache-Control response header.
+ (NSDate *)expiryDateForRequest:(ASIHTTPRequest *)request maxAge:(NSTimeInterval)maxAge;
// Returns a date from a string in RFC1123 format
+ (NSDate *)dateFromRFC1123String:(NSString *)string;
@ -898,7 +903,7 @@ typedef void (^ASIDataBlock)(NSData *data);
@property (retain) NSString *username;
@property (retain) NSString *password;
@property (retain) NSString *userAgent;
@property (retain) NSString *userAgentString;
@property (retain) NSString *domain;
@property (retain) NSString *proxyUsername;

File diff suppressed because it is too large Load diff

View file

@ -11,6 +11,12 @@
// Debug output configuration options
// ======
// If defined will use the specified function for debug logging
// Otherwise use NSLog
#ifndef ASI_DEBUG_LOG
#define ASI_DEBUG_LOG NSLog
#endif
// When set to 1 ASIHTTPRequests will print information about what a request is doing
#ifndef DEBUG_REQUEST_STATUS
#define DEBUG_REQUEST_STATUS 0
@ -33,5 +39,5 @@
// When set to 1, ASIHTTPRequests will print information about HTTP authentication (Basic, Digest or NTLM) to the console
#ifndef DEBUG_HTTP_AUTHENTICATION
#define DEBUG_HTTP_AUTHENTICATION 0
#define DEBUG_HTTP_AUTHENTICATION 0
#endif

View file

@ -58,9 +58,11 @@ static NSLock *readLock = nil;
}
[request performThrottling];
}
[ASIHTTPRequest incrementBandwidthUsedInLastSecond:toRead];
[readLock unlock];
return [stream read:buffer maxLength:toRead];
NSInteger rv = [stream read:buffer maxLength:toRead];
if (rv > 0)
[ASIHTTPRequest incrementBandwidthUsedInLastSecond:rv];
return rv;
}
/*

View file

@ -11,10 +11,6 @@
// Known issue: You cannot use startSychronous with an ASIWebPageRequest
#import "ASIHTTPRequest.h"
#import <libxml/HTMLparser.h>
#import <libxml/xmlsave.h>
#import <libxml/xpath.h>
#import <libxml/xpathInternals.h>
@class ASINetworkQueue;
@ -52,7 +48,7 @@ typedef enum _ASIURLReplacementMode {
NSMutableDictionary *resourceList;
// Used internally for parsing HTML (with libxml)
xmlDocPtr doc;
struct _xmlDoc *doc;
// If the response is an HTML or CSS file, this will be set so the content can be correctly parsed when it has finished fetching external resources
ASIWebContentType webContentType;
@ -64,6 +60,9 @@ typedef enum _ASIURLReplacementMode {
// Controls what ASIWebPageRequest does with external resources. See the notes above for more.
ASIURLReplacementMode urlReplacementMode;
// When set to NO, loading will stop when an external resource fails to load. Defaults to YES
BOOL shouldIgnoreExternalResourceErrors;
}
// Will return a data URI that contains a base64 version of the content at this url
@ -77,4 +76,5 @@ typedef enum _ASIURLReplacementMode {
@property (retain, nonatomic) ASIWebPageRequest *parentRequest;
@property (assign, nonatomic) ASIURLReplacementMode urlReplacementMode;
@property (assign, nonatomic) BOOL shouldIgnoreExternalResourceErrors;
@end

View file

@ -10,6 +10,10 @@
#import "ASIWebPageRequest.h"
#import "ASINetworkQueue.h"
#import <CommonCrypto/CommonHMAC.h>
#import <libxml/HTMLparser.h>
#import <libxml/xmlsave.h>
#import <libxml/xpath.h>
#import <libxml/xpathInternals.h>
// An xPath query that controls the external resources ASIWebPageRequest will fetch
// By default, it will fetch stylesheets, javascript files, images, frames, iframes, and html 5 video / audio
@ -45,6 +49,13 @@ static NSMutableArray *requestsUsingXMLParser = nil;
}
}
- (id)initWithURL:(NSURL *)newURL
{
self = [super initWithURL:newURL];
[self setShouldIgnoreExternalResourceErrors:YES];
return self;
}
- (void)dealloc
{
[externalResourceQueue cancelAllOperations];
@ -59,6 +70,9 @@ static NSMutableArray *requestsUsingXMLParser = nil;
// We override it to stop that happening, and instead do that work in the bottom of finishedFetchingExternalResources:
- (void)markAsFinished
{
if ([self error]) {
[super markAsFinished];
}
}
// This method is normally responsible for telling delegates we are done, but it happens to be the most convenient place to parse the responses
@ -120,6 +134,7 @@ static NSMutableArray *requestsUsingXMLParser = nil;
[[self externalResourceQueue] cancelAllOperations];
[self setExternalResourceQueue:[ASINetworkQueue queue]];
[[self externalResourceQueue] setDelegate:self];
[[self externalResourceQueue] setShouldCancelAllRequestsOnFailure:[self shouldIgnoreExternalResourceErrors]];
[[self externalResourceQueue] setShowAccurateProgress:[self showAccurateProgress]];
[[self externalResourceQueue] setQueueDidFinishSelector:@selector(finishedFetchingExternalResources:)];
[[self externalResourceQueue] setRequestDidFinishSelector:@selector(externalResourceFetchSucceeded:)];
@ -246,6 +261,7 @@ static NSMutableArray *requestsUsingXMLParser = nil;
[[self externalResourceQueue] cancelAllOperations];
[self setExternalResourceQueue:[ASINetworkQueue queue]];
[[self externalResourceQueue] setDelegate:self];
[[self externalResourceQueue] setShouldCancelAllRequestsOnFailure:[self shouldIgnoreExternalResourceErrors]];
[[self externalResourceQueue] setShowAccurateProgress:[self showAccurateProgress]];
[[self externalResourceQueue] setQueueDidFinishSelector:@selector(finishedFetchingExternalResources:)];
[[self externalResourceQueue] setRequestDidFinishSelector:@selector(externalResourceFetchSucceeded:)];
@ -292,7 +308,9 @@ static NSMutableArray *requestsUsingXMLParser = nil;
- (void)externalResourceFetchFailed:(ASIHTTPRequest *)externalResourceRequest
{
[self failWithError:[externalResourceRequest error]];
if ([[self externalResourceQueue] shouldCancelAllRequestsOnFailure]) {
[self failWithError:[externalResourceRequest error]];
}
}
- (void)finishedFetchingExternalResources:(ASINetworkQueue *)queue
@ -700,4 +718,5 @@ static NSMutableArray *requestsUsingXMLParser = nil;
@synthesize resourceList;
@synthesize parentRequest;
@synthesize urlReplacementMode;
@synthesize shouldIgnoreExternalResourceErrors;
@end

View file

@ -24,10 +24,12 @@
// Response:
// X-CDN-Enabled: True
// X-CDN-URI: http://cdn.cloudfiles.mosso.com/c1234
// X-CDN-SSL-URI: https://cdn.ssl.cloudfiles.mosso.com/c1234
// X-CDN-TTL: 86400
+ (id)containerInfoRequest:(NSString *)containerName;
- (BOOL)cdnEnabled;
- (NSString *)cdnURI;
- (NSString *)cdnSSLURI;
- (NSUInteger)cdnTTL;

View file

@ -38,15 +38,35 @@
}
- (BOOL)cdnEnabled {
return [[[self responseHeaders] objectForKey:@"X-Cdn-Enabled"] boolValue];
NSNumber *enabled = [[self responseHeaders] objectForKey:@"X-CDN-Enabled"];
if (!enabled) {
enabled = [[self responseHeaders] objectForKey:@"X-Cdn-Enabled"];
}
return [enabled boolValue];
}
- (NSString *)cdnURI {
return [[self responseHeaders] objectForKey:@"X-Cdn-Uri"];
NSString *uri = [[self responseHeaders] objectForKey:@"X-CDN-URI"];
if (!uri) {
uri = [[self responseHeaders] objectForKey:@"X-Cdn-Uri"];
}
return uri;
}
- (NSString *)cdnSSLURI {
NSString *uri = [[self responseHeaders] objectForKey:@"X-CDN-SSL-URI"];
if (!uri) {
uri = [[self responseHeaders] objectForKey:@"X-Cdn-Ssl-Uri"];
}
return uri;
}
- (NSUInteger)cdnTTL {
return [[[self responseHeaders] objectForKey:@"X-Ttl"] intValue];
NSNumber *ttl = [[self responseHeaders] objectForKey:@"X-TTL"];
if (!ttl) {
ttl = [[self responseHeaders] objectForKey:@"X-Ttl"];
}
return [ttl intValue];
}
#pragma mark -
@ -130,7 +150,7 @@
if (ttl > 0) {
[request addRequestHeader:@"X-Ttl" value:[NSString stringWithFormat:@"%i", ttl]];
}
[request addRequestHeader:@"X-Cdn-Enabled" value:cdnEnabled ? @"True" : @"False"];
[request addRequestHeader:@"X-CDN-Enabled" value:cdnEnabled ? @"True" : @"False"];
return request;
}

View file

@ -22,6 +22,9 @@
-(void) dealloc {
[name release];
[cdnURL release];
[referrerACL release];
[useragentACL release];
[super dealloc];
}

View file

@ -130,7 +130,7 @@
object.bytes = [[[self responseHeaders] objectForKey:@"Content-Length"] intValue];
object.contentType = [[self responseHeaders] objectForKey:@"Content-Type"];
object.lastModified = [[self responseHeaders] objectForKey:@"Last-Modified"];
object.metadata = [[NSMutableDictionary alloc] init];
object.metadata = [NSMutableDictionary dictionary];
for (NSString *key in [[self responseHeaders] keyEnumerator]) {
NSRange metaRange = [key rangeOfString:@"X-Object-Meta-"];

View file

@ -69,7 +69,13 @@ static NSRecursiveLock *accessDetailsLock = nil;
NSDictionary *responseHeaders = [request responseHeaders];
authToken = [responseHeaders objectForKey:@"X-Auth-Token"];
storageURL = [responseHeaders objectForKey:@"X-Storage-Url"];
cdnManagementURL = [responseHeaders objectForKey:@"X-Cdn-Management-Url"];
cdnManagementURL = [responseHeaders objectForKey:@"X-CDN-Management-Url"];
// there is a bug in the Cloud Files API for some older accounts that causes
// the CDN URL to come back in a slightly different header
if (!cdnManagementURL) {
cdnManagementURL = [responseHeaders objectForKey:@"X-Cdn-Management-Url"];
}
}
[accessDetailsLock unlock];
return [request error];

View file

@ -19,12 +19,20 @@
return bucket;
}
- (void)dealloc
{
[name release];
[creationDate release];
[ownerID release];
[ownerName release];
[super dealloc];
}
- (NSString *)description
{
return [NSString stringWithFormat:@"Name: %@ creationDate: %@ ownerID: %@ ownerName: %@",[self name],[self creationDate],[self ownerID],[self ownerName]];
}
@synthesize name;
@synthesize creationDate;
@synthesize ownerID;

View file

@ -98,7 +98,7 @@
[queryParts addObject:[NSString stringWithFormat:@"delimiter=%@",[[self delimiter] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
}
if ([self maxResultCount] > 0) {
[queryParts addObject:[NSString stringWithFormat:@"max-keys=%hi",[self maxResultCount]]];
[queryParts addObject:[NSString stringWithFormat:@"max-keys=%i",[self maxResultCount]]];
}
if ([queryParts count]) {
NSString* template = @"%@?%@";

View file

@ -84,9 +84,11 @@ NSString *const ASIS3StorageClassReducedRedundancy = @"REDUCED_REDUNDANCY";
ASIS3ObjectRequest *newRequest = [super copyWithZone:zone];
[newRequest setBucket:[self bucket]];
[newRequest setKey:[self key]];
[newRequest setMimeType:[self mimeType]];
[newRequest setSourceBucket:[self sourceBucket]];
[newRequest setSourceKey:[self sourceKey]];
[newRequest setMimeType:[self mimeType]];
[newRequest setSubResource:[self subResource]];
[newRequest setStorageClass:[self storageClass]];
return newRequest;
}

View file

@ -197,6 +197,7 @@ static NSString *sharedSecretAccessKey = nil;
ASIS3Request *newRequest = [super copyWithZone:zone];
[newRequest setAccessKey:[self accessKey]];
[newRequest setSecretAccessKey:[self secretAccessKey]];
[newRequest setRequestScheme:[self requestScheme]];
[newRequest setAccessPolicy:[self accessPolicy]];
return newRequest;
}

View file

@ -1 +0,0 @@
../../SDWebImage/SDWebImage/NSData+GIF.h

View file

@ -119,7 +119,8 @@ extern NSObject *kTAGDataLayerObjectNotPresent;
* will be evaluated and matching tags will fire.
*
* @param update The update object to process
*/- (void)push:(NSDictionary*)update;
*/
- (void)push:(NSDictionary*)update;
/**
* Returns the object in the model associated with the given key.

View file

@ -4,3 +4,9 @@ and the Google Tag Manager SDK.
The libGoogleAnalyticsServices.a library contains code for both.
Within the subdirectories, you can find header files and documentation
for each.
The libAdIdAccess.a library contains functions that call the AdSupport
framework. If you would like your application to access the identifier for
advertisers (IDFA) and tracking flag provided by that framework through the
Google Tag Manager SDK macros, you will also need to add this library to your
XCode project.

View file

@ -1 +0,0 @@
../../SDWebImage/SDWebImage/NSData+GIF.h

View file

@ -192,8 +192,8 @@ CGRect IASKCGRectSwap(CGRect rect);
[super viewDidAppear:animated];
NSNotificationCenter *dc = [NSNotificationCenter defaultCenter];
IASK_IF_IOS4_OR_GREATER([dc addObserver:self selector:@selector(synchronizeSettings) name:UIApplicationDidEnterBackgroundNotification object:[UIApplication sharedApplication]];);
IASK_IF_IOS4_OR_GREATER([dc addObserver:self selector:@selector(reload) name:UIApplicationWillEnterForegroundNotification object:[UIApplication sharedApplication]];);
[dc addObserver:self selector:@selector(synchronizeSettings) name:UIApplicationDidEnterBackgroundNotification object:[UIApplication sharedApplication]];
[dc addObserver:self selector:@selector(reload) name:UIApplicationWillEnterForegroundNotification object:[UIApplication sharedApplication]];
[dc addObserver:self selector:@selector(synchronizeSettings) name:UIApplicationWillTerminateNotification object:[UIApplication sharedApplication]];
}
@ -203,7 +203,11 @@ CGRect IASKCGRectSwap(CGRect rect);
}
- (void)viewDidDisappear:(BOOL)animated {
[[NSNotificationCenter defaultCenter] removeObserver:self];
NSNotificationCenter *dc = [NSNotificationCenter defaultCenter];
[dc removeObserver:self name:NSUserDefaultsDidChangeNotification object:[NSUserDefaults standardUserDefaults]];
[dc removeObserver:self name:UIApplicationDidEnterBackgroundNotification object:[UIApplication sharedApplication]];
[dc removeObserver:self name:UIApplicationWillEnterForegroundNotification object:[UIApplication sharedApplication]];
[dc removeObserver:self name:UIApplicationWillTerminateNotification object:[UIApplication sharedApplication]];
// hide the keyboard
[self.currentFirstResponder resignFirstResponder];

View file

@ -36,6 +36,7 @@
#define kIASKAutoCorrectionType @"AutocorrectionType"
#define kIASKValues @"Values"
#define kIASKTitles @"Titles"
#define kIASKShortTitles @"ShortTitles"
#define kIASKViewControllerClass @"IASKViewControllerClass"
#define kIASKViewControllerSelector @"IASKViewControllerSelector"
#define kIASKButtonClass @"IASKButtonClass"

View file

@ -21,17 +21,19 @@
*/
@protocol IASKSettingsStore <NSObject>
@required
- (id)objectForKey:(NSString*)key;
- (void)setObject:(id)value forKey:(NSString*)key;
- (BOOL)synchronize; // Write settings to a permanant storage. Returns YES on success, NO otherwise
@optional
- (void)setBool:(BOOL)value forKey:(NSString*)key;
- (void)setFloat:(float)value forKey:(NSString*)key;
- (void)setDouble:(double)value forKey:(NSString*)key;
- (void)setInteger:(int)value forKey:(NSString*)key;
- (void)setObject:(id)value forKey:(NSString*)key;
- (BOOL)boolForKey:(NSString*)key;
- (float)floatForKey:(NSString*)key;
- (double)doubleForKey:(NSString*)key;
- (NSInteger)integerForKey:(NSString*)key;
- (id)objectForKey:(NSString*)key;
- (BOOL)synchronize; // Write settings to a permanant storage. Returns YES on success, NO otherwise
@end

View file

@ -30,6 +30,11 @@
return nil;
}
- (void)removeObjectForKey:(NSString*)key {
[NSException raise:@"Unimplemented"
format:@"removeObjectForKey: must be implemented in subclasses of IASKAbstractSettingsStore"];
}
- (void)setBool:(BOOL)value forKey:(NSString*)key {
[self setObject:[NSNumber numberWithBool:value] forKey:key];
}

View file

@ -44,6 +44,10 @@
return [_dict objectForKey:key];
}
- (void) removeObjectForKey:(NSString *)key {
[_dict removeObjectForKey:key];
}
- (BOOL)synchronize {
return [_dict writeToFile:_filePath atomically:YES];
}

View file

@ -77,6 +77,10 @@
return [self.defaults objectForKey:key];
}
- (void)removeObjectForKey:(NSString *)key {
[self.defaults removeObjectForKey:key];
}
- (BOOL)synchronize {
return [self.defaults synchronize];
}

View file

@ -40,7 +40,7 @@
- (void)_reinterpretValues:(NSDictionary*)specifierDict {
NSArray *values = [_specifierDict objectForKey:kIASKValues];
NSArray *titles = [_specifierDict objectForKey:kIASKTitles];
NSArray *shortTitles = [_specifierDict objectForKey:kIASKShortTitles];
NSMutableDictionary *multipleValuesDict = [NSMutableDictionary new];
if (values) {
@ -51,6 +51,10 @@
[multipleValuesDict setObject:titles forKey:kIASKTitles];
}
if (shortTitles) {
[multipleValuesDict setObject:shortTitles forKey:kIASKShortTitles];
}
[self setMultipleValuesDict:multipleValuesDict];
}
- (NSString*)localizedObjectForKey:(NSString*)key {
@ -91,7 +95,10 @@
- (NSString*)titleForCurrentValue:(id)currentValue {
NSArray *values = [self multipleValues];
NSArray *titles = [self multipleTitles];
NSArray *titles = [self multipleShortTitles];
if (!titles)
titles = [self multipleTitles];
if (values.count != titles.count) {
return nil;
}
@ -118,6 +125,10 @@
return [_multipleValuesDict objectForKey:kIASKTitles];
}
- (NSArray*)multipleShortTitles {
return [_multipleValuesDict objectForKey:kIASKShortTitles];
}
- (NSString*)file {
return [_specifierDict objectForKey:kIASKFile];
}

36
Pods/Manifest.lock generated
View file

@ -1,24 +1,26 @@
PODS:
- ASIHTTPRequest (1.8.1):
- ASIHTTPRequest (1.8.2):
- ASIHTTPRequest/ASIWebPageRequest
- ASIHTTPRequest/CloudFiles
- ASIHTTPRequest/Core
- ASIHTTPRequest/S3
- ASIHTTPRequest/ASIWebPageRequest (1.8.2):
- ASIHTTPRequest/Core
- ASIHTTPRequest/CloudFiles (1.8.2):
- ASIHTTPRequest/Core
- ASIHTTPRequest/Core (1.8.2):
- Reachability
- ASIHTTPRequest/ASIWebPageRequest (1.8.1):
- Reachability
- ASIHTTPRequest/CloudFiles (1.8.1):
- Reachability
- ASIHTTPRequest/S3 (1.8.1):
- Reachability
- GoogleAnalytics-iOS-SDK (3.0.3)
- InAppSettingsKit (2.0)
- iRate (1.9.2)
- ASIHTTPRequest/S3 (1.8.2):
- ASIHTTPRequest/Core
- GoogleAnalytics-iOS-SDK (3.0.6)
- InAppSettingsKit (2.0.1)
- iRate (1.9.3)
- MBProgressHUD (0.8)
- Reachability (3.1.1)
- SBJson (3.2)
- SDWebImage (3.5.2):
- SDWebImage (3.5.4):
- SDWebImage/Core
- SDWebImage/Core (3.5.2)
- SDWebImage/Core (3.5.4)
- TMQuiltView (0.0.1)
- ViewDeck (2.3.1)
@ -35,14 +37,14 @@ DEPENDENCIES:
- ViewDeck (~> 2.3.1)
SPEC CHECKSUMS:
ASIHTTPRequest: 162783e0cd71bdd3ff1ceed0cd5fa9505e0116a8
GoogleAnalytics-iOS-SDK: 7b0e55cfe5e70d60478a7b105f15ac71e8bc373e
InAppSettingsKit: 2b85ba925a81634860461c21274f54b130c84614
iRate: 7c4bc22ab4a8752185d84bed7a98dc111c8212a5
ASIHTTPRequest: 4bd3ed65bf8a726292c5fa79ea5c0a2e02c97241
GoogleAnalytics-iOS-SDK: c135fb62b1e5aa003b7be97b656ccee212896cf7
InAppSettingsKit: 5e42f626b9be9c33e3b04c0cc9523ca5eabe7ad3
iRate: 99aef520b335a1eb4a14a8d9ba5e8db4e1d95bbe
MBProgressHUD: 2bbc6f470111daf7f3eaa4eb12b8cbf01c4c0622
Reachability: be4883bb93f31e38266ae3365e5600a317aae735
SBJson: abc2bf2baef456d5dae213f9826fe2b6fdf19861
SDWebImage: fe7ce01ae4e0a884d168f59c9dd82d35baf8429e
SDWebImage: 1a62010700adbba823b621fc217906739dbf6aa5
TMQuiltView: 520d09d6a98f1a6aa75ed92a91123ecc79bab62c
ViewDeck: 2cdc67c4b41a10cafc7556b982f028409e33604d

View file

@ -6,3 +6,4 @@

View file

@ -1,3 +1,3 @@
PODS_GOOGLEANALYTICS_IOS_SDK_HEADER_SEARCH_PATHS = $(SDKROOT)/usr/include/libz
PODS_GOOGLEANALYTICS_IOS_SDK_LIBRARY_SEARCH_PATHS = "$(PODS_ROOT)/GoogleAnalytics-iOS-SDK"
PODS_GOOGLEANALYTICS_IOS_SDK_OTHER_LDFLAGS = -lGoogleAnalyticsServices -lz -framework CFNetwork -framework CoreData -framework SystemConfiguration -weak_framework AdSupport
PODS_GOOGLEANALYTICS_IOS_SDK_OTHER_LDFLAGS = -lGoogleAnalyticsServices -lz -framework CFNetwork -framework CoreData -framework SystemConfiguration

View file

@ -170,7 +170,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
iRate
Version 1.9.2, January 21st, 2014
Version 1.9.3, February 5th, 2014
Copyright (C) 2011 Charcoal Design

View file

@ -217,7 +217,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
<key>FooterText</key>
<string>iRate
Version 1.9.2, January 21st, 2014
Version 1.9.3, February 5th, 2014
Copyright (C) 2011 Charcoal Design

View file

@ -10,37 +10,43 @@
#define COCOAPODS_POD_AVAILABLE_ASIHTTPRequest
#define COCOAPODS_VERSION_MAJOR_ASIHTTPRequest 1
#define COCOAPODS_VERSION_MINOR_ASIHTTPRequest 8
#define COCOAPODS_VERSION_PATCH_ASIHTTPRequest 1
#define COCOAPODS_VERSION_PATCH_ASIHTTPRequest 2
// ASIHTTPRequest/ASIWebPageRequest
#define COCOAPODS_POD_AVAILABLE_ASIHTTPRequest_ASIWebPageRequest
#define COCOAPODS_VERSION_MAJOR_ASIHTTPRequest_ASIWebPageRequest 1
#define COCOAPODS_VERSION_MINOR_ASIHTTPRequest_ASIWebPageRequest 8
#define COCOAPODS_VERSION_PATCH_ASIHTTPRequest_ASIWebPageRequest 1
#define COCOAPODS_VERSION_PATCH_ASIHTTPRequest_ASIWebPageRequest 2
// ASIHTTPRequest/CloudFiles
#define COCOAPODS_POD_AVAILABLE_ASIHTTPRequest_CloudFiles
#define COCOAPODS_VERSION_MAJOR_ASIHTTPRequest_CloudFiles 1
#define COCOAPODS_VERSION_MINOR_ASIHTTPRequest_CloudFiles 8
#define COCOAPODS_VERSION_PATCH_ASIHTTPRequest_CloudFiles 1
#define COCOAPODS_VERSION_PATCH_ASIHTTPRequest_CloudFiles 2
// ASIHTTPRequest/Core
#define COCOAPODS_POD_AVAILABLE_ASIHTTPRequest_Core
#define COCOAPODS_VERSION_MAJOR_ASIHTTPRequest_Core 1
#define COCOAPODS_VERSION_MINOR_ASIHTTPRequest_Core 8
#define COCOAPODS_VERSION_PATCH_ASIHTTPRequest_Core 2
// ASIHTTPRequest/S3
#define COCOAPODS_POD_AVAILABLE_ASIHTTPRequest_S3
#define COCOAPODS_VERSION_MAJOR_ASIHTTPRequest_S3 1
#define COCOAPODS_VERSION_MINOR_ASIHTTPRequest_S3 8
#define COCOAPODS_VERSION_PATCH_ASIHTTPRequest_S3 1
#define COCOAPODS_VERSION_PATCH_ASIHTTPRequest_S3 2
// GoogleAnalytics-iOS-SDK
#define COCOAPODS_POD_AVAILABLE_GoogleAnalytics_iOS_SDK
#define COCOAPODS_VERSION_MAJOR_GoogleAnalytics_iOS_SDK 3
#define COCOAPODS_VERSION_MINOR_GoogleAnalytics_iOS_SDK 0
#define COCOAPODS_VERSION_PATCH_GoogleAnalytics_iOS_SDK 3
#define COCOAPODS_VERSION_PATCH_GoogleAnalytics_iOS_SDK 6
// InAppSettingsKit
#define COCOAPODS_POD_AVAILABLE_InAppSettingsKit
#define COCOAPODS_VERSION_MAJOR_InAppSettingsKit 2
#define COCOAPODS_VERSION_MINOR_InAppSettingsKit 0
#define COCOAPODS_VERSION_PATCH_InAppSettingsKit 0
#define COCOAPODS_VERSION_PATCH_InAppSettingsKit 1
// MBProgressHUD
#define COCOAPODS_POD_AVAILABLE_MBProgressHUD
@ -64,13 +70,13 @@
#define COCOAPODS_POD_AVAILABLE_SDWebImage
#define COCOAPODS_VERSION_MAJOR_SDWebImage 3
#define COCOAPODS_VERSION_MINOR_SDWebImage 5
#define COCOAPODS_VERSION_PATCH_SDWebImage 2
#define COCOAPODS_VERSION_PATCH_SDWebImage 4
// SDWebImage/Core
#define COCOAPODS_POD_AVAILABLE_SDWebImage_Core
#define COCOAPODS_VERSION_MAJOR_SDWebImage_Core 3
#define COCOAPODS_VERSION_MINOR_SDWebImage_Core 5
#define COCOAPODS_VERSION_PATCH_SDWebImage_Core 2
#define COCOAPODS_VERSION_PATCH_SDWebImage_Core 4
// TMQuiltView
#define COCOAPODS_POD_AVAILABLE_TMQuiltView
@ -88,5 +94,5 @@
#define COCOAPODS_POD_AVAILABLE_iRate
#define COCOAPODS_VERSION_MAJOR_iRate 1
#define COCOAPODS_VERSION_MINOR_iRate 9
#define COCOAPODS_VERSION_PATCH_iRate 2
#define COCOAPODS_VERSION_PATCH_iRate 3

2
Pods/Pods.xcconfig generated
View file

@ -2,5 +2,5 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/ASIHTTPRequest" "${PODS_ROOT}/Headers/GoogleAnalytics-iOS-SDK" "${PODS_ROOT}/Headers/InAppSettingsKit" "${PODS_ROOT}/Headers/MBProgressHUD" "${PODS_ROOT}/Headers/Reachability" "${PODS_ROOT}/Headers/SBJson" "${PODS_ROOT}/Headers/SDWebImage" "${PODS_ROOT}/Headers/TMQuiltView" "${PODS_ROOT}/Headers/ViewDeck" "${PODS_ROOT}/Headers/iRate" "$(SDKROOT)/usr/include/libxml2" $(SDKROOT)/usr/include/libz
LIBRARY_SEARCH_PATHS = "$(PODS_ROOT)/GoogleAnalytics-iOS-SDK"
OTHER_CFLAGS = $(inherited) "-isystem${PODS_ROOT}/Headers" "-isystem${PODS_ROOT}/Headers/ASIHTTPRequest" "-isystem${PODS_ROOT}/Headers/GoogleAnalytics-iOS-SDK" "-isystem${PODS_ROOT}/Headers/InAppSettingsKit" "-isystem${PODS_ROOT}/Headers/MBProgressHUD" "-isystem${PODS_ROOT}/Headers/Reachability" "-isystem${PODS_ROOT}/Headers/SBJson" "-isystem${PODS_ROOT}/Headers/SDWebImage" "-isystem${PODS_ROOT}/Headers/TMQuiltView" "-isystem${PODS_ROOT}/Headers/ViewDeck" "-isystem${PODS_ROOT}/Headers/iRate"
OTHER_LDFLAGS = -ObjC -lGoogleAnalyticsServices -lxml2.2 -lz -lz.1 -framework CFNetwork -framework CoreData -framework CoreGraphics -framework ImageIO -framework MessageUI -framework MobileCoreServices -framework QuartzCore -framework SystemConfiguration -weak_framework AdSupport
OTHER_LDFLAGS = -ObjC -lGoogleAnalyticsServices -lxml2.2 -lz -lz.1 -framework CFNetwork -framework CoreData -framework CoreGraphics -framework ImageIO -framework MessageUI -framework MobileCoreServices -framework QuartzCore -framework SystemConfiguration
PODS_ROOT = ${SRCROOT}/Pods

File diff suppressed because it is too large Load diff

View file

@ -16,8 +16,9 @@ It provides:
- A guarantee that main thread will never be blocked
- Performances!
- Use GCD and ARC
- Arm64 support
NOTE: The version 3.0 of SDWebImage isn't fully backward compatible with 2.0 and requires iOS 5.0
NOTE: The version 3.0 of SDWebImage isn't fully backward compatible with 2.0 and requires iOS 5.1.1
minimum deployement version. If you need iOS < 5.0 support, please use the last [2.0 version](https://github.com/rs/SDWebImage/tree/2.0-compat).
[How is SDWebImage better than X?](https://github.com/rs/SDWebImage/wiki/How-is-SDWebImage-better-than-X%3F)
@ -138,7 +139,7 @@ key is an application unique identifier for the image to cache. It is generally
the image.
```objective-c
SDImageCache *imageCache = [SDImageCache.alloc initWithNamespace:@"myNamespace"];
SDImageCache *imageCache = [[SDImageCache alloc] initWithNamespace:@"myNamespace"];
[imageCache queryDiskCacheForKey:myCacheKey done:^(UIImage *image)
{
// image is not nil if image was found

View file

@ -1,15 +0,0 @@
//
// NSData+GIF.h
// SDWebImage
//
// Created by Andy LaVoy on 4/28/13.
// Copyright (c) 2013 Dailymotion. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSData (GIF)
- (BOOL)sd_isGIF;
@end

View file

@ -1,32 +0,0 @@
//
// NSData+GIF.m
// SDWebImage
//
// Created by Andy LaVoy on 4/28/13.
// Copyright (c) 2013 Dailymotion. All rights reserved.
//
#import "NSData+GIF.h"
@implementation NSData (GIF)
- (BOOL)sd_isGIF
{
BOOL isGIF = NO;
uint8_t c;
[self getBytes:&c length:1];
switch (c)
{
case 0x47: // probably a GIF
isGIF = YES;
break;
default:
break;
}
return isGIF;
}
@end

View file

@ -9,22 +9,20 @@
#import <Foundation/Foundation.h>
#import "SDWebImageCompat.h"
enum SDImageCacheType
{
typedef NS_ENUM(NSInteger, SDImageCacheType) {
/**
* The image wasn't available the SDWebImage caches, but was downloaded from the web.
*/
SDImageCacheTypeNone = 0,
SDImageCacheTypeNone,
/**
* The image was obtained from the disk cache.
*/
SDImageCacheTypeDisk,
SDImageCacheTypeDisk,
/**
* The image was obtained from the memory cache.
*/
SDImageCacheTypeMemory
SDImageCacheTypeMemory
};
typedef enum SDImageCacheType SDImageCacheType;
/**
* SDImageCache maintains a memory cache and an optional disk cache. Disk cache write operations are performed
@ -45,7 +43,7 @@ typedef enum SDImageCacheType SDImageCacheType;
/**
* The maximum size of the cache, in bytes.
*/
@property (assign, nonatomic) unsigned long long maxCacheSize;
@property (assign, nonatomic) NSUInteger maxCacheSize;
/**
* Returns global shared cache instance
@ -144,6 +142,7 @@ typedef enum SDImageCacheType SDImageCacheType;
* Clear all disk cached images
*/
- (void)clearDisk;
- (void)clearDiskOnCompletion:(void (^)())completion;
/**
* Remove all expired cached image from disk
@ -153,7 +152,7 @@ typedef enum SDImageCacheType SDImageCacheType;
/**
* Get the size used by the disk cache
*/
- (unsigned long long)getSize;
- (NSUInteger)getSize;
/**
* Get the number of images in the disk cache
@ -163,7 +162,7 @@ typedef enum SDImageCacheType SDImageCacheType;
/**
* Asynchronously calculate the disk cache's size.
*/
- (void)calculateSizeWithCompletionBlock:(void (^)(NSUInteger fileCount, unsigned long long totalSize))completionBlock;
- (void)calculateSizeWithCompletionBlock:(void (^)(NSUInteger fileCount, NSUInteger totalSize))completionBlock;
/**
* Check if image exists in cache already

View file

@ -10,8 +10,6 @@
#import "SDWebImageDecoder.h"
#import "UIImage+MultiFormat.h"
#import <CommonCrypto/CommonDigest.h>
#import <mach/mach.h>
#import <mach/mach_host.h>
static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week
// PNG signature bytes and data (below)
@ -19,13 +17,11 @@ static unsigned char kPNGSignatureBytes[8] = {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A
static NSData *kPNGSignatureData = nil;
BOOL ImageDataHasPNGPreffix(NSData *data);
BOOL ImageDataHasPNGPreffix(NSData *data)
{
BOOL ImageDataHasPNGPreffix(NSData *data) {
NSUInteger pngSignatureLength = [kPNGSignatureData length];
if ([data length] >= pngSignatureLength)
{
if ([[data subdataWithRange:NSMakeRange(0, pngSignatureLength)] isEqualToData:kPNGSignatureData])
{
if ([data length] >= pngSignatureLength) {
if ([[data subdataWithRange:NSMakeRange(0, pngSignatureLength)] isEqualToData:kPNGSignatureData]) {
return YES;
}
}
@ -43,32 +39,26 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
@end
@implementation SDImageCache
{
@implementation SDImageCache {
NSFileManager *_fileManager;
}
+ (SDImageCache *)sharedImageCache
{
+ (SDImageCache *)sharedImageCache {
static dispatch_once_t once;
static id instance;
dispatch_once(&once, ^
{
instance = self.new;
dispatch_once(&once, ^{
instance = [self new];
kPNGSignatureData = [NSData dataWithBytes:kPNGSignatureBytes length:8];
});
return instance;
}
- (id)init
{
- (id)init {
return [self initWithNamespace:@"default"];
}
- (id)initWithNamespace:(NSString *)ns
{
if ((self = [super init]))
{
- (id)initWithNamespace:(NSString *)ns {
if ((self = [super init])) {
NSString *fullNamespace = [@"com.hackemist.SDWebImageCache." stringByAppendingString:ns];
// Create IO serial queue
@ -85,9 +75,8 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
_diskCachePath = [paths[0] stringByAppendingPathComponent:fullNamespace];
dispatch_sync(_ioQueue, ^
{
_fileManager = NSFileManager.new;
dispatch_sync(_ioQueue, ^{
_fileManager = [NSFileManager new];
});
#if TARGET_OS_IPHONE
@ -112,72 +101,59 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
return self;
}
- (void)dealloc
{
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
SDDispatchQueueRelease(_ioQueue);
}
- (void)addReadOnlyCachePath:(NSString *)path
{
if (!self.customPaths)
{
self.customPaths = NSMutableArray.new;
- (void)addReadOnlyCachePath:(NSString *)path {
if (!self.customPaths) {
self.customPaths = [NSMutableArray new];
}
if (![self.customPaths containsObject:path])
{
if (![self.customPaths containsObject:path]) {
[self.customPaths addObject:path];
}
}
#pragma mark SDImageCache (private)
- (NSString *)cachePathForKey:(NSString *)key inPath:(NSString *)path
{
- (NSString *)cachePathForKey:(NSString *)key inPath:(NSString *)path {
NSString *filename = [self cachedFileNameForKey:key];
return [path stringByAppendingPathComponent:filename];
}
- (NSString *)defaultCachePathForKey:(NSString *)key
{
- (NSString *)defaultCachePathForKey:(NSString *)key {
return [self cachePathForKey:key inPath:self.diskCachePath];
}
- (NSString *)cachedFileNameForKey:(NSString *)key
{
- (NSString *)cachedFileNameForKey:(NSString *)key {
const char *str = [key UTF8String];
if (str == NULL)
{
if (str == NULL) {
str = "";
}
unsigned char r[CC_MD5_DIGEST_LENGTH];
CC_MD5(str, (CC_LONG)strlen(str), r);
NSString *filename = [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15]];
r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15]];
return filename;
}
#pragma mark ImageCache
- (void)storeImage:(UIImage *)image recalculateFromImage:(BOOL)recalculate imageData:(NSData *)imageData forKey:(NSString *)key toDisk:(BOOL)toDisk
{
if (!image || !key)
{
- (void)storeImage:(UIImage *)image recalculateFromImage:(BOOL)recalculate imageData:(NSData *)imageData forKey:(NSString *)key toDisk:(BOOL)toDisk {
if (!image || !key) {
return;
}
[self.memCache setObject:image forKey:key cost:image.size.height * image.size.width * image.scale];
if (toDisk)
{
dispatch_async(self.ioQueue, ^
{
if (toDisk) {
dispatch_async(self.ioQueue, ^{
NSData *data = imageData;
if (image && (recalculate || !data))
{
if (image && (recalculate || !data)) {
#if TARGET_OS_IPHONE
// We need to determine if the image is a PNG or a JPEG
// PNGs are easier to detect because they have a unique signature (http://www.w3.org/TR/PNG-Structure.html)
@ -189,17 +165,14 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
BOOL imageIsPng = YES;
// But if we have an image data, we will look at the preffix
if ([imageData length] >= [kPNGSignatureData length])
{
if ([imageData length] >= [kPNGSignatureData length]) {
imageIsPng = ImageDataHasPNGPreffix(imageData);
}
if (imageIsPng)
{
if (imageIsPng) {
data = UIImagePNGRepresentation(image);
}
else
{
else {
data = UIImageJPEGRepresentation(image, (CGFloat)1.0);
}
#else
@ -207,13 +180,11 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
#endif
}
if (data)
{
if (data) {
// Can't use defaultManager another thread
NSFileManager *fileManager = NSFileManager.new;
NSFileManager *fileManager = [NSFileManager new];
if (![fileManager fileExistsAtPath:_diskCachePath])
{
if (![fileManager fileExistsAtPath:_diskCachePath]) {
[fileManager createDirectoryAtPath:_diskCachePath withIntermediateDirectories:YES attributes:nil error:NULL];
}
@ -223,45 +194,37 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
}
}
- (void)storeImage:(UIImage *)image forKey:(NSString *)key
{
- (void)storeImage:(UIImage *)image forKey:(NSString *)key {
[self storeImage:image recalculateFromImage:YES imageData:nil forKey:key toDisk:YES];
}
- (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk
{
- (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk {
[self storeImage:image recalculateFromImage:YES imageData:nil forKey:key toDisk:toDisk];
}
- (BOOL)diskImageExistsWithKey:(NSString *)key
{
- (BOOL)diskImageExistsWithKey:(NSString *)key {
__block BOOL exists = NO;
dispatch_sync(_ioQueue, ^
{
dispatch_sync(_ioQueue, ^{
exists = [_fileManager fileExistsAtPath:[self defaultCachePathForKey:key]];
});
return exists;
}
- (UIImage *)imageFromMemoryCacheForKey:(NSString *)key
{
- (UIImage *)imageFromMemoryCacheForKey:(NSString *)key {
return [self.memCache objectForKey:key];
}
- (UIImage *)imageFromDiskCacheForKey:(NSString *)key
{
- (UIImage *)imageFromDiskCacheForKey:(NSString *)key {
// First check the in-memory cache...
UIImage *image = [self imageFromMemoryCacheForKey:key];
if (image)
{
if (image) {
return image;
}
// Second check the disk cache...
UIImage *diskImage = [self diskImageForKey:key];
if (diskImage)
{
if (diskImage) {
CGFloat cost = diskImage.size.height * diskImage.size.width * diskImage.scale;
[self.memCache setObject:diskImage forKey:key cost:cost];
}
@ -269,17 +232,14 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
return diskImage;
}
- (NSData *)diskImageDataBySearchingAllPathsForKey:(NSString *)key
{
- (NSData *)diskImageDataBySearchingAllPathsForKey:(NSString *)key {
NSString *defaultPath = [self defaultCachePathForKey:key];
NSData *data = [NSData dataWithContentsOfFile:defaultPath];
if (data)
{
if (data) {
return data;
}
for (NSString *path in self.customPaths)
{
for (NSString *path in self.customPaths) {
NSString *filePath = [self cachePathForKey:key inPath:path];
NSData *imageData = [NSData dataWithContentsOfFile:filePath];
if (imageData) {
@ -290,65 +250,53 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
return nil;
}
- (UIImage *)diskImageForKey:(NSString *)key
{
- (UIImage *)diskImageForKey:(NSString *)key {
NSData *data = [self diskImageDataBySearchingAllPathsForKey:key];
if (data)
{
if (data) {
UIImage *image = [UIImage sd_imageWithData:data];
image = [self scaledImageForKey:key image:image];
image = [UIImage decodedImageWithImage:image];
return image;
}
else
{
else {
return nil;
}
}
- (UIImage *)scaledImageForKey:(NSString *)key image:(UIImage *)image
{
- (UIImage *)scaledImageForKey:(NSString *)key image:(UIImage *)image {
return SDScaledImageForKey(key, image);
}
- (NSOperation *)queryDiskCacheForKey:(NSString *)key done:(void (^)(UIImage *image, SDImageCacheType cacheType))doneBlock
{
NSOperation *operation = NSOperation.new;
- (NSOperation *)queryDiskCacheForKey:(NSString *)key done:(void (^)(UIImage *image, SDImageCacheType cacheType))doneBlock {
NSOperation *operation = [NSOperation new];
if (!doneBlock) return nil;
if (!key)
{
if (!key) {
doneBlock(nil, SDImageCacheTypeNone);
return nil;
}
// First check the in-memory cache...
UIImage *image = [self imageFromMemoryCacheForKey:key];
if (image)
{
if (image) {
doneBlock(image, SDImageCacheTypeMemory);
return nil;
}
dispatch_async(self.ioQueue, ^
{
if (operation.isCancelled)
{
dispatch_async(self.ioQueue, ^{
if (operation.isCancelled) {
return;
}
@autoreleasepool
{
@autoreleasepool {
UIImage *diskImage = [self diskImageForKey:key];
if (diskImage)
{
if (diskImage) {
CGFloat cost = diskImage.size.height * diskImage.size.width * diskImage.scale;
[self.memCache setObject:diskImage forKey:key cost:cost];
}
dispatch_main_sync_safe(^
{
dispatch_main_sync_safe(^{
doneBlock(diskImage, SDImageCacheTypeDisk);
});
}
@ -357,63 +305,62 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
return operation;
}
- (void)removeImageForKey:(NSString *)key
{
- (void)removeImageForKey:(NSString *)key {
[self removeImageForKey:key fromDisk:YES];
}
- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk
{
if (key == nil)
{
- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk {
if (key == nil) {
return;
}
[self.memCache removeObjectForKey:key];
if (fromDisk)
{
dispatch_async(self.ioQueue, ^
{
if (fromDisk) {
dispatch_async(self.ioQueue, ^{
[[NSFileManager defaultManager] removeItemAtPath:[self defaultCachePathForKey:key] error:nil];
});
}
}
- (void)setMaxMemoryCost:(NSUInteger)maxMemoryCost
{
- (void)setMaxMemoryCost:(NSUInteger)maxMemoryCost {
self.memCache.totalCostLimit = maxMemoryCost;
}
- (NSUInteger)maxMemoryCost
{
- (NSUInteger)maxMemoryCost {
return self.memCache.totalCostLimit;
}
- (void)clearMemory
{
- (void)clearMemory {
[self.memCache removeAllObjects];
}
- (void)clearDisk
- (void)clearDisk {
[self clearDiskOnCompletion:nil];
}
- (void)clearDiskOnCompletion:(void (^)())completion
{
dispatch_async(self.ioQueue, ^
{
dispatch_async(self.ioQueue, ^{
[[NSFileManager defaultManager] removeItemAtPath:self.diskCachePath error:nil];
[[NSFileManager defaultManager] createDirectoryAtPath:self.diskCachePath
withIntermediateDirectories:YES
attributes:nil
error:NULL];
if (completion) {
dispatch_main_sync_safe(^{
completion();
});
}
});
}
- (void)cleanDisk
{
dispatch_async(self.ioQueue, ^
{
- (void)cleanDisk {
dispatch_async(self.ioQueue, ^{
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *diskCacheURL = [NSURL fileURLWithPath:self.diskCachePath isDirectory:YES];
NSArray *resourceKeys = @[ NSURLIsDirectoryKey, NSURLContentModificationDateKey, NSURLTotalFileAllocatedSizeKey ];
NSArray *resourceKeys = @[NSURLIsDirectoryKey, NSURLContentModificationDateKey, NSURLTotalFileAllocatedSizeKey];
// This enumerator prefetches useful properties for our cache files.
NSDirectoryEnumerator *fileEnumerator = [fileManager enumeratorAtURL:diskCacheURL
@ -423,61 +370,53 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
NSDate *expirationDate = [NSDate dateWithTimeIntervalSinceNow:-self.maxCacheAge];
NSMutableDictionary *cacheFiles = [NSMutableDictionary dictionary];
unsigned long long currentCacheSize = 0;
NSUInteger currentCacheSize = 0;
// Enumerate all of the files in the cache directory. This loop has two purposes:
//
// 1. Removing files that are older than the expiration date.
// 2. Storing file attributes for the size-based cleanup pass.
for (NSURL *fileURL in fileEnumerator)
{
for (NSURL *fileURL in fileEnumerator) {
NSDictionary *resourceValues = [fileURL resourceValuesForKeys:resourceKeys error:NULL];
// Skip directories.
if ([resourceValues[NSURLIsDirectoryKey] boolValue])
{
if ([resourceValues[NSURLIsDirectoryKey] boolValue]) {
continue;
}
// Remove files that are older than the expiration date;
NSDate *modificationDate = resourceValues[NSURLContentModificationDateKey];
if ([[modificationDate laterDate:expirationDate] isEqualToDate:expirationDate])
{
if ([[modificationDate laterDate:expirationDate] isEqualToDate:expirationDate]) {
[fileManager removeItemAtURL:fileURL error:nil];
continue;
}
// Store a reference to this file and account for its total size.
NSNumber *totalAllocatedSize = resourceValues[NSURLTotalFileAllocatedSizeKey];
currentCacheSize += [totalAllocatedSize unsignedLongLongValue];
currentCacheSize += [totalAllocatedSize unsignedIntegerValue];
[cacheFiles setObject:resourceValues forKey:fileURL];
}
// If our remaining disk cache exceeds a configured maximum size, perform a second
// size-based cleanup pass. We delete the oldest files first.
if (self.maxCacheSize > 0 && currentCacheSize > self.maxCacheSize)
{
if (self.maxCacheSize > 0 && currentCacheSize > self.maxCacheSize) {
// Target half of our maximum cache size for this cleanup pass.
const unsigned long long desiredCacheSize = self.maxCacheSize / 2;
const NSUInteger desiredCacheSize = self.maxCacheSize / 2;
// Sort the remaining cache files by their last modification time (oldest first).
NSArray *sortedFiles = [cacheFiles keysSortedByValueWithOptions:NSSortConcurrent
usingComparator:^NSComparisonResult(id obj1, id obj2)
{
return [obj1[NSURLContentModificationDateKey] compare:obj2[NSURLContentModificationDateKey]];
}];
usingComparator:^NSComparisonResult(id obj1, id obj2) {
return [obj1[NSURLContentModificationDateKey] compare:obj2[NSURLContentModificationDateKey]];
}];
// Delete files until we fall below our desired cache size.
for (NSURL *fileURL in sortedFiles)
{
if ([fileManager removeItemAtURL:fileURL error:nil])
{
for (NSURL *fileURL in sortedFiles) {
if ([fileManager removeItemAtURL:fileURL error:nil]) {
NSDictionary *resourceValues = cacheFiles[fileURL];
NSNumber *totalAllocatedSize = resourceValues[NSURLTotalFileAllocatedSizeKey];
currentCacheSize -= [totalAllocatedSize unsignedLongLongValue];
currentCacheSize -= [totalAllocatedSize unsignedIntegerValue];
if (currentCacheSize < desiredCacheSize)
{
if (currentCacheSize < desiredCacheSize) {
break;
}
}
@ -486,11 +425,9 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
});
}
- (void)backgroundCleanDisk
{
- (void)backgroundCleanDisk {
UIApplication *application = [UIApplication sharedApplication];
__block UIBackgroundTaskIdentifier bgTask = [application beginBackgroundTaskWithExpirationHandler:^
{
__block UIBackgroundTaskIdentifier bgTask = [application beginBackgroundTaskWithExpirationHandler:^{
// Clean up any unfinished task business by marking where you
// stopped or ending the task outright.
[application endBackgroundTask:bgTask];
@ -498,8 +435,7 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
}];
// Start the long-running task and return immediately.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// Do the work associated with the task, preferably in chunks.
[self cleanDisk];
@ -508,12 +444,10 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
});
}
- (unsigned long long)getSize
{
unsigned long long size = 0;
- (NSUInteger)getSize {
NSUInteger size = 0;
NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:self.diskCachePath];
for (NSString *fileName in fileEnumerator)
{
for (NSString *fileName in fileEnumerator) {
NSString *filePath = [self.diskCachePath stringByAppendingPathComponent:fileName];
NSDictionary *attrs = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil];
size += [attrs fileSize];
@ -521,45 +455,38 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
return size;
}
- (int)getDiskCount
{
- (int)getDiskCount {
int count = 0;
NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:self.diskCachePath];
for (__unused NSString *fileName in fileEnumerator)
{
for (__unused NSString *fileName in fileEnumerator) {
count += 1;
}
return count;
}
- (void)calculateSizeWithCompletionBlock:(void (^)(NSUInteger fileCount, unsigned long long totalSize))completionBlock
{
- (void)calculateSizeWithCompletionBlock:(void (^)(NSUInteger fileCount, NSUInteger totalSize))completionBlock {
NSURL *diskCacheURL = [NSURL fileURLWithPath:self.diskCachePath isDirectory:YES];
dispatch_async(self.ioQueue, ^
{
dispatch_async(self.ioQueue, ^{
NSUInteger fileCount = 0;
unsigned long long totalSize = 0;
NSUInteger totalSize = 0;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSDirectoryEnumerator *fileEnumerator = [fileManager enumeratorAtURL:diskCacheURL
includingPropertiesForKeys:@[ NSFileSize ]
includingPropertiesForKeys:@[NSFileSize]
options:NSDirectoryEnumerationSkipsHiddenFiles
errorHandler:NULL];
for (NSURL *fileURL in fileEnumerator)
{
for (NSURL *fileURL in fileEnumerator) {
NSNumber *fileSize;
[fileURL getResourceValue:&fileSize forKey:NSURLFileSizeKey error:NULL];
totalSize += [fileSize unsignedLongLongValue];
totalSize += [fileSize unsignedIntegerValue];
fileCount += 1;
}
if (completionBlock)
{
dispatch_main_sync_safe(^
{
if (completionBlock) {
dispatch_main_sync_safe(^{
completionBlock(fileCount, totalSize);
});
}

View file

@ -26,7 +26,17 @@
#define UIImageView NSImageView
#endif
#else
#import <UIKit/UIKit.h>
#endif
#ifndef NS_ENUM
#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
#endif
#ifndef NS_OPTIONS
#define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type
#endif
#if OS_OBJECT_USE_OBJC
@ -35,10 +45,10 @@
#define SDDispatchQueueRelease(q)
#define SDDispatchQueueSetterSementics strong
#else
#undef SDDispatchQueueRelease
#undef SDDispatchQueueSetterSementics
#define SDDispatchQueueRelease(q) (dispatch_release(q))
#define SDDispatchQueueSetterSementics assign
#undef SDDispatchQueueRelease
#undef SDDispatchQueueSetterSementics
#define SDDispatchQueueRelease(q) (dispatch_release(q))
#define SDDispatchQueueSetterSementics assign
#endif
extern UIImage *SDScaledImageForKey(NSString *key, UIImage *image);

View file

@ -12,34 +12,27 @@
#error SDWebImage is ARC only. Either turn on ARC for the project or use -fobjc-arc flag
#endif
inline UIImage *SDScaledImageForKey(NSString *key, UIImage *image)
{
if ([image.images count] > 0)
{
inline UIImage *SDScaledImageForKey(NSString *key, UIImage *image) {
if ([image.images count] > 0) {
NSMutableArray *scaledImages = [NSMutableArray array];
for (UIImage *tempImage in image.images)
{
for (UIImage *tempImage in image.images) {
[scaledImages addObject:SDScaledImageForKey(key, tempImage)];
}
return [UIImage animatedImageWithImages:scaledImages duration:image.duration];
}
else
{
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
{
else {
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) {
CGFloat scale = 1.0;
if (key.length >= 8)
{
if (key.length >= 8) {
// Search @2x. at the end of the string, before a 3 to 4 extension length (only if key len is 8 or more @2x. + 4 len ext)
NSRange range = [key rangeOfString:@"@2x." options:0 range:NSMakeRange(key.length - 8, 5)];
if (range.location != NSNotFound)
{
if (range.location != NSNotFound) {
scale = 2.0;
}
}
UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation];
image = scaledImage;
}

View file

@ -12,10 +12,8 @@
@implementation UIImage (ForceDecode)
+ (UIImage *)decodedImageWithImage:(UIImage *)image
{
if (image.images)
{
+ (UIImage *)decodedImageWithImage:(UIImage *)image {
if (image.images) {
// Do not decode animated images
return image;
}
@ -29,22 +27,20 @@
int infoMask = (bitmapInfo & kCGBitmapAlphaInfoMask);
BOOL anyNonAlpha = (infoMask == kCGImageAlphaNone ||
infoMask == kCGImageAlphaNoneSkipFirst ||
infoMask == kCGImageAlphaNoneSkipLast);
infoMask == kCGImageAlphaNoneSkipFirst ||
infoMask == kCGImageAlphaNoneSkipLast);
// CGBitmapContextCreate doesn't support kCGImageAlphaNone with RGB.
// https://developer.apple.com/library/mac/#qa/qa1037/_index.html
if (infoMask == kCGImageAlphaNone && CGColorSpaceGetNumberOfComponents(colorSpace) > 1)
{
if (infoMask == kCGImageAlphaNone && CGColorSpaceGetNumberOfComponents(colorSpace) > 1) {
// Unset the old alpha info.
bitmapInfo &= ~kCGBitmapAlphaInfoMask;
// Set noneSkipFirst.
bitmapInfo |= kCGImageAlphaNoneSkipFirst;
}
// Some PNGs tell us they have alpha but only 3 components. Odd.
else if (!anyNonAlpha && CGColorSpaceGetNumberOfComponents(colorSpace) == 3)
{
// Some PNGs tell us they have alpha but only 3 components. Odd.
else if (!anyNonAlpha && CGColorSpaceGetNumberOfComponents(colorSpace) == 3) {
// Unset the old alpha info.
bitmapInfo &= ~kCGBitmapAlphaInfoMask;
bitmapInfo |= kCGImageAlphaPremultipliedFirst;
@ -52,22 +48,22 @@
// It calculates the bytes-per-row based on the bitsPerComponent and width arguments.
CGContextRef context = CGBitmapContextCreate(NULL,
imageSize.width,
imageSize.height,
CGImageGetBitsPerComponent(imageRef),
0,
colorSpace,
bitmapInfo);
imageSize.width,
imageSize.height,
CGImageGetBitsPerComponent(imageRef),
0,
colorSpace,
bitmapInfo);
CGColorSpaceRelease(colorSpace);
// If failed, return undecompressed image
if (!context) return image;
CGContextDrawImage(context, imageRect, imageRef);
CGImageRef decompressedImageRef = CGBitmapContextCreateImage(context);
CGContextRelease(context);
UIImage *decompressedImage = [UIImage imageWithCGImage:decompressedImageRef scale:image.scale orientation:image.imageOrientation];
CGImageRelease(decompressedImageRef);
return decompressedImage;

View file

@ -10,54 +10,53 @@
#import "SDWebImageCompat.h"
#import "SDWebImageOperation.h"
typedef enum
{
typedef NS_OPTIONS(NSUInteger, SDWebImageDownloaderOptions) {
SDWebImageDownloaderLowPriority = 1 << 0,
SDWebImageDownloaderProgressiveDownload = 1 << 1,
/**
* By default, request prevent the of NSURLCache. With this flag, NSURLCache
* is used with default policies.
*/
SDWebImageDownloaderUseNSURLCache = 1 << 2,
SDWebImageDownloaderUseNSURLCache = 1 << 2,
/**
* Call completion block with nil image/imageData if the image was read from NSURLCache
* (to be combined with `SDWebImageDownloaderUseNSURLCache`).
*/
SDWebImageDownloaderIgnoreCachedResponse = 1 << 3,
SDWebImageDownloaderIgnoreCachedResponse = 1 << 3,
/**
* In iOS 4+, continue the download of the image if the app goes to background. This is achieved by asking the system for
* extra time in background to let the request finish. If the background task expires the operation will be cancelled.
*/
SDWebImageDownloaderContinueInBackground = 1 << 4,
SDWebImageDownloaderContinueInBackground = 1 << 4,
/**
* Handles cookies stored in NSHTTPCookieStore by setting
* NSMutableURLRequest.HTTPShouldHandleCookies = YES;
*/
SDWebImageDownloaderHandleCookies = 1 << 5,
SDWebImageDownloaderHandleCookies = 1 << 5,
/**
* Enable to allow untrusted SSL ceriticates.
* Useful for testing purposes. Use with caution in production.
*/
SDWebImageDownloaderAllowInvalidSSLCertificates = 1 << 6
SDWebImageDownloaderAllowInvalidSSLCertificates = 1 << 6
} SDWebImageDownloaderOptions;
};
typedef enum
{
typedef NS_ENUM(NSInteger, SDWebImageDownloaderExecutionOrder) {
SDWebImageDownloaderFIFOExecutionOrder,
/**
* Default value. All download operations will execute in queue style (first-in-first-out).
*/
SDWebImageDownloaderLIFOExecutionOrder
SDWebImageDownloaderLIFOExecutionOrder
/**
* All download operations will execute in stack style (last-in-first-out).
*/
} SDWebImageDownloaderExecutionOrder;
};
extern NSString *const SDWebImageDownloadStartNotification;
extern NSString *const SDWebImageDownloadStopNotification;
typedef void(^SDWebImageDownloaderProgressBlock)(NSUInteger receivedSize, long long expectedSize);
typedef void(^SDWebImageDownloaderProgressBlock)(NSInteger receivedSize, NSInteger expectedSize);
typedef void(^SDWebImageDownloaderCompletedBlock)(UIImage *image, NSData *data, NSError *error, BOOL finished);
/**
@ -131,9 +130,9 @@ typedef void(^SDWebImageDownloaderCompletedBlock)(UIImage *image, NSData *data,
*
* @return A cancellable SDWebImageOperation
*/
- (id<SDWebImageOperation>)downloadImageWithURL:(NSURL *)url
options:(SDWebImageDownloaderOptions)options
progress:(SDWebImageDownloaderProgressBlock)progressBlock
completed:(SDWebImageDownloaderCompletedBlock)completedBlock;
- (id <SDWebImageOperation>)downloadImageWithURL:(NSURL *)url
options:(SDWebImageDownloaderOptions)options
progress:(SDWebImageDownloaderProgressBlock)progressBlock
completed:(SDWebImageDownloaderCompletedBlock)completedBlock;
@end

View file

@ -29,12 +29,10 @@ static NSString *const kCompletedCallbackKey = @"completed";
@implementation SDWebImageDownloader
+ (void)initialize
{
+ (void)initialize {
// Bind SDNetworkActivityIndicator if available (download it here: http://github.com/rs/SDNetworkActivityIndicator )
// To use it, just add #import "SDNetworkActivityIndicator.h" in addition to the SDWebImage import
if (NSClassFromString(@"SDNetworkActivityIndicator"))
{
if (NSClassFromString(@"SDNetworkActivityIndicator")) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
@ -54,22 +52,21 @@ static NSString *const kCompletedCallbackKey = @"completed";
}
}
+ (SDWebImageDownloader *)sharedDownloader
{
+ (SDWebImageDownloader *)sharedDownloader {
static dispatch_once_t once;
static id instance;
dispatch_once(&once, ^{instance = self.new;});
dispatch_once(&once, ^{
instance = [self new];
});
return instance;
}
- (id)init
{
if ((self = [super init]))
{
- (id)init {
if ((self = [super init])) {
_executionOrder = SDWebImageDownloaderFIFOExecutionOrder;
_downloadQueue = NSOperationQueue.new;
_downloadQueue = [NSOperationQueue new];
_downloadQueue.maxConcurrentOperationCount = 2;
_URLCallbacks = NSMutableDictionary.new;
_URLCallbacks = [NSMutableDictionary new];
_HTTPHeaders = [NSMutableDictionary dictionaryWithObject:@"image/webp,image/*;q=0.8" forKey:@"Accept"];
_barrierQueue = dispatch_queue_create("com.hackemist.SDWebImageDownloaderBarrierQueue", DISPATCH_QUEUE_CONCURRENT);
_downloadTimeout = 15.0;
@ -77,103 +74,87 @@ static NSString *const kCompletedCallbackKey = @"completed";
return self;
}
- (void)dealloc
{
- (void)dealloc {
[self.downloadQueue cancelAllOperations];
SDDispatchQueueRelease(_barrierQueue);
}
- (void)setValue:(NSString *)value forHTTPHeaderField:(NSString *)field
{
if (value)
{
- (void)setValue:(NSString *)value forHTTPHeaderField:(NSString *)field {
if (value) {
self.HTTPHeaders[field] = value;
}
else
{
else {
[self.HTTPHeaders removeObjectForKey:field];
}
}
- (NSString *)valueForHTTPHeaderField:(NSString *)field
{
- (NSString *)valueForHTTPHeaderField:(NSString *)field {
return self.HTTPHeaders[field];
}
- (void)setMaxConcurrentDownloads:(NSInteger)maxConcurrentDownloads
{
- (void)setMaxConcurrentDownloads:(NSInteger)maxConcurrentDownloads {
_downloadQueue.maxConcurrentOperationCount = maxConcurrentDownloads;
}
- (NSUInteger)currentDownloadCount
{
- (NSUInteger)currentDownloadCount {
return _downloadQueue.operationCount;
}
- (NSInteger)maxConcurrentDownloads
{
- (NSInteger)maxConcurrentDownloads {
return _downloadQueue.maxConcurrentOperationCount;
}
- (id<SDWebImageOperation>)downloadImageWithURL:(NSURL *)url options:(SDWebImageDownloaderOptions)options progress:(void (^)(NSUInteger, long long))progressBlock completed:(void (^)(UIImage *, NSData *, NSError *, BOOL))completedBlock
{
- (id <SDWebImageOperation>)downloadImageWithURL:(NSURL *)url options:(SDWebImageDownloaderOptions)options progress:(void (^)(NSInteger, NSInteger))progressBlock completed:(void (^)(UIImage *, NSData *, NSError *, BOOL))completedBlock {
__block SDWebImageDownloaderOperation *operation;
__weak SDWebImageDownloader *wself = self;
[self addProgressCallback:progressBlock andCompletedBlock:completedBlock forURL:url createCallback:^
{
[self addProgressCallback:progressBlock andCompletedBlock:completedBlock forURL:url createCallback:^{
NSTimeInterval timeoutInterval = wself.downloadTimeout;
if (timeoutInterval == 0.0) {
timeoutInterval = 15.0;
}
// In order to prevent from potential duplicate caching (NSURLCache + SDImageCache) we disable the cache for image requests if told otherwise
NSMutableURLRequest *request = [NSMutableURLRequest.alloc initWithURL:url cachePolicy:(options & SDWebImageDownloaderUseNSURLCache ? NSURLRequestUseProtocolCachePolicy : NSURLRequestReloadIgnoringLocalCacheData) timeoutInterval:timeoutInterval];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url cachePolicy:(options & SDWebImageDownloaderUseNSURLCache ? NSURLRequestUseProtocolCachePolicy : NSURLRequestReloadIgnoringLocalCacheData) timeoutInterval:timeoutInterval];
request.HTTPShouldHandleCookies = (options & SDWebImageDownloaderHandleCookies);
request.HTTPShouldUsePipelining = YES;
if (wself.headersFilter)
{
if (wself.headersFilter) {
request.allHTTPHeaderFields = wself.headersFilter(url, [wself.HTTPHeaders copy]);
}
else
{
else {
request.allHTTPHeaderFields = wself.HTTPHeaders;
}
operation = [SDWebImageDownloaderOperation.alloc initWithRequest:request options:options progress:^(NSUInteger receivedSize, long long expectedSize)
{
if (!wself) return;
SDWebImageDownloader *sself = wself;
NSArray *callbacksForURL = [sself callbacksForURL:url];
for (NSDictionary *callbacks in callbacksForURL)
{
SDWebImageDownloaderProgressBlock callback = callbacks[kProgressCallbackKey];
if (callback) callback(receivedSize, expectedSize);
}
}
completed:^(UIImage *image, NSData *data, NSError *error, BOOL finished)
{
if (!wself) return;
SDWebImageDownloader *sself = wself;
NSArray *callbacksForURL = [sself callbacksForURL:url];
if (finished)
{
[sself removeCallbacksForURL:url];
}
for (NSDictionary *callbacks in callbacksForURL)
{
SDWebImageDownloaderCompletedBlock callback = callbacks[kCompletedCallbackKey];
if (callback) callback(image, data, error, finished);
}
}
cancelled:^
{
if (!wself) return;
SDWebImageDownloader *sself = wself;
[sself removeCallbacksForURL:url];
}];
operation = [[SDWebImageDownloaderOperation alloc] initWithRequest:request
options:options
progress:^(NSInteger receivedSize, NSInteger expectedSize) {
if (!wself) return;
SDWebImageDownloader *sself = wself;
NSArray *callbacksForURL = [sself callbacksForURL:url];
for (NSDictionary *callbacks in callbacksForURL) {
SDWebImageDownloaderProgressBlock callback = callbacks[kProgressCallbackKey];
if (callback) callback(receivedSize, expectedSize);
}
}
completed:^(UIImage *image, NSData *data, NSError *error, BOOL finished) {
if (!wself) return;
SDWebImageDownloader *sself = wself;
NSArray *callbacksForURL = [sself callbacksForURL:url];
if (finished) {
[sself removeCallbacksForURL:url];
}
for (NSDictionary *callbacks in callbacksForURL) {
SDWebImageDownloaderCompletedBlock callback = callbacks[kCompletedCallbackKey];
if (callback) callback(image, data, error, finished);
}
}
cancelled:^{
if (!wself) return;
SDWebImageDownloader *sself = wself;
[sself removeCallbacksForURL:url];
}];
[wself.downloadQueue addOperation:operation];
if (wself.executionOrder == SDWebImageDownloaderLIFOExecutionOrder)
{
if (wself.executionOrder == SDWebImageDownloaderLIFOExecutionOrder) {
// Emulate LIFO execution order by systematically adding new operations as last operation's dependency
[wself.lastAddedOperation addDependency:operation];
wself.lastAddedOperation = operation;
@ -183,56 +164,46 @@ static NSString *const kCompletedCallbackKey = @"completed";
return operation;
}
- (void)addProgressCallback:(void (^)(NSUInteger, long long))progressBlock andCompletedBlock:(void (^)(UIImage *, NSData *data, NSError *, BOOL))completedBlock forURL:(NSURL *)url createCallback:(void (^)())createCallback
{
- (void)addProgressCallback:(void (^)(NSInteger, NSInteger))progressBlock andCompletedBlock:(void (^)(UIImage *, NSData *data, NSError *, BOOL))completedBlock forURL:(NSURL *)url createCallback:(void (^)())createCallback {
// The URL will be used as the key to the callbacks dictionary so it cannot be nil. If it is nil immediately call the completed block with no image or data.
if(url == nil)
{
if (completedBlock != nil)
{
if (url == nil) {
if (completedBlock != nil) {
completedBlock(nil, nil, nil, NO);
}
return;
}
dispatch_barrier_sync(self.barrierQueue, ^
{
dispatch_barrier_sync(self.barrierQueue, ^{
BOOL first = NO;
if (!self.URLCallbacks[url])
{
self.URLCallbacks[url] = NSMutableArray.new;
if (!self.URLCallbacks[url]) {
self.URLCallbacks[url] = [NSMutableArray new];
first = YES;
}
// Handle single download of simultaneous download request for the same URL
NSMutableArray *callbacksForURL = self.URLCallbacks[url];
NSMutableDictionary *callbacks = NSMutableDictionary.new;
NSMutableDictionary *callbacks = [NSMutableDictionary new];
if (progressBlock) callbacks[kProgressCallbackKey] = [progressBlock copy];
if (completedBlock) callbacks[kCompletedCallbackKey] = [completedBlock copy];
[callbacksForURL addObject:callbacks];
self.URLCallbacks[url] = callbacksForURL;
if (first)
{
if (first) {
createCallback();
}
});
}
- (NSArray *)callbacksForURL:(NSURL *)url
{
- (NSArray *)callbacksForURL:(NSURL *)url {
__block NSArray *callbacksForURL;
dispatch_sync(self.barrierQueue, ^
{
dispatch_sync(self.barrierQueue, ^{
callbacksForURL = self.URLCallbacks[url];
});
return [callbacksForURL copy];
}
- (void)removeCallbacksForURL:(NSURL *)url
{
dispatch_barrier_async(self.barrierQueue, ^
{
- (void)removeCallbacksForURL:(NSURL *)url {
dispatch_barrier_async(self.barrierQueue, ^{
[self.URLCallbacks removeObjectForKey:url];
});
}

View file

@ -19,7 +19,7 @@
@property (assign, nonatomic, getter = isExecuting) BOOL executing;
@property (assign, nonatomic, getter = isFinished) BOOL finished;
@property (assign, nonatomic) long long expectedSize;
@property (assign, nonatomic) NSInteger expectedSize;
@property (strong, nonatomic) NSMutableData *imageData;
@property (strong, nonatomic) NSURLConnection *connection;
@property (strong, atomic) NSThread *thread;
@ -30,16 +30,14 @@
@end
@implementation SDWebImageDownloaderOperation
{
@implementation SDWebImageDownloaderOperation {
size_t width, height;
UIImageOrientation orientation;
BOOL responseFromCached;
}
- (id)initWithRequest:(NSURLRequest *)request options:(SDWebImageDownloaderOptions)options progress:(void (^)(NSUInteger, long long))progressBlock completed:(void (^)(UIImage *, NSData *, NSError *, BOOL))completedBlock cancelled:(void (^)())cancelBlock
{
if ((self = [super init]))
{
- (id)initWithRequest:(NSURLRequest *)request options:(SDWebImageDownloaderOptions)options progress:(void (^)(NSInteger, NSInteger))progressBlock completed:(void (^)(UIImage *, NSData *, NSError *, BOOL))completedBlock cancelled:(void (^)())cancelBlock {
if ((self = [super init])) {
_request = request;
_options = options;
_progressBlock = [progressBlock copy];
@ -53,27 +51,21 @@
return self;
}
- (void)start
{
@synchronized(self)
{
if (self.isCancelled)
{
- (void)start {
@synchronized (self) {
if (self.isCancelled) {
self.finished = YES;
[self reset];
return;
}
#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
if ([self shouldContinueWhenAppEntersBackground])
{
__weak __typeof__(self) wself = self;
self.backgroundTaskId = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^
{
__strong __typeof(wself)sself = wself;
if ([self shouldContinueWhenAppEntersBackground]) {
__weak __typeof__ (self) wself = self;
self.backgroundTaskId = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
__strong __typeof (wself) sself = wself;
if (sself)
{
if (sself) {
[sself cancel];
[[UIApplication sharedApplication] endBackgroundTask:sself.backgroundTaskId];
@ -84,76 +76,62 @@
#endif
self.executing = YES;
self.connection = [NSURLConnection.alloc initWithRequest:self.request delegate:self startImmediately:NO];
self.connection = [[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO];
self.thread = [NSThread currentThread];
}
[self.connection start];
if (self.connection)
{
if (self.progressBlock)
{
self.progressBlock(0, -1);
if (self.connection) {
if (self.progressBlock) {
self.progressBlock(0, NSURLResponseUnknownLength);
}
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStartNotification object:self];
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_5_1)
{
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_5_1) {
// Make sure to run the runloop in our background thread so it can process downloaded data
// Note: we use a timeout to work around an issue with NSURLConnection cancel under iOS 5
// not waking up the runloop, leading to dead threads (see https://github.com/rs/SDWebImage/issues/466)
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 10, false);
}
else
{
else {
CFRunLoopRun();
}
if (!self.isFinished)
{
if (!self.isFinished) {
[self.connection cancel];
[self connection:self.connection didFailWithError:[NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorTimedOut userInfo:@{NSURLErrorFailingURLErrorKey: self.request.URL}]];
[self connection:self.connection didFailWithError:[NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorTimedOut userInfo:@{NSURLErrorFailingURLErrorKey : self.request.URL}]];
}
}
else
{
if (self.completedBlock)
{
self.completedBlock(nil, nil, [NSError errorWithDomain:NSURLErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey: @"Connection can't be initialized"}], YES);
else {
if (self.completedBlock) {
self.completedBlock(nil, nil, [NSError errorWithDomain:NSURLErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey : @"Connection can't be initialized"}], YES);
}
}
}
- (void)cancel
{
@synchronized(self)
{
if (self.thread)
{
- (void)cancel {
@synchronized (self) {
if (self.thread) {
[self performSelector:@selector(cancelInternalAndStop) onThread:self.thread withObject:nil waitUntilDone:NO];
}
else
{
else {
[self cancelInternal];
}
}
}
- (void)cancelInternalAndStop
{
- (void)cancelInternalAndStop {
[self cancelInternal];
CFRunLoopStop(CFRunLoopGetCurrent());
}
- (void)cancelInternal
{
- (void)cancelInternal {
if (self.isFinished) return;
[super cancel];
if (self.cancelBlock) self.cancelBlock();
if (self.connection)
{
if (self.connection) {
[self.connection cancel];
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:self];
@ -166,15 +144,13 @@
[self reset];
}
- (void)done
{
- (void)done {
self.finished = YES;
self.executing = NO;
[self reset];
}
- (void)reset
{
- (void)reset {
self.cancelBlock = nil;
self.completedBlock = nil;
self.progressBlock = nil;
@ -183,48 +159,40 @@
self.thread = nil;
}
- (void)setFinished:(BOOL)finished
{
- (void)setFinished:(BOOL)finished {
[self willChangeValueForKey:@"isFinished"];
_finished = finished;
[self didChangeValueForKey:@"isFinished"];
}
- (void)setExecuting:(BOOL)executing
{
- (void)setExecuting:(BOOL)executing {
[self willChangeValueForKey:@"isExecuting"];
_executing = executing;
[self didChangeValueForKey:@"isExecuting"];
}
- (BOOL)isConcurrent
{
- (BOOL)isConcurrent {
return YES;
}
#pragma mark NSURLConnection (delegate)
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
if (![response respondsToSelector:@selector(statusCode)] || [((NSHTTPURLResponse *)response) statusCode] < 400)
{
NSUInteger expected = response.expectedContentLength > 0 ? (NSUInteger)response.expectedContentLength : 0;
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
if (![response respondsToSelector:@selector(statusCode)] || [((NSHTTPURLResponse *)response) statusCode] < 400) {
NSInteger expected = response.expectedContentLength > 0 ? (NSInteger)response.expectedContentLength : 0;
self.expectedSize = expected;
if (self.progressBlock)
{
if (self.progressBlock) {
self.progressBlock(0, expected);
}
self.imageData = [NSMutableData.alloc initWithCapacity:expected];
self.imageData = [[NSMutableData alloc] initWithCapacity:expected];
}
else
{
else {
[self.connection cancel];
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:nil];
if (self.completedBlock)
{
if (self.completedBlock) {
self.completedBlock(nil, nil, [NSError errorWithDomain:NSURLErrorDomain code:[((NSHTTPURLResponse *)response) statusCode] userInfo:nil], YES);
}
@ -232,73 +200,72 @@
}
}
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
[self.imageData appendData:data];
if ((self.options & SDWebImageDownloaderProgressiveDownload) && self.expectedSize > 0 && self.completedBlock)
{
if ((self.options & SDWebImageDownloaderProgressiveDownload) && self.expectedSize > 0 && self.completedBlock) {
// The following code is from http://www.cocoaintheshell.com/2011/05/progressive-images-download-imageio/
// Thanks to the author @Nyx0uf
// Get the total bytes downloaded
const NSUInteger totalSize = self.imageData.length;
const NSInteger totalSize = self.imageData.length;
// Update the data source, we must pass ALL the data, not just the new bytes
CGImageSourceRef imageSource = CGImageSourceCreateIncremental(NULL);
CGImageSourceUpdateData(imageSource, (__bridge CFDataRef)self.imageData, totalSize == self.expectedSize);
CGImageSourceUpdateData(imageSource, (__bridge CFDataRef)self.imageData, totalSize == self.expectedSize);
if (width + height == 0)
{
if (width + height == 0) {
CFDictionaryRef properties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, NULL);
if (properties)
{
if (properties) {
NSInteger orientationValue = -1;
CFTypeRef val = CFDictionaryGetValue(properties, kCGImagePropertyPixelHeight);
if (val) CFNumberGetValue(val, kCFNumberLongType, &height);
val = CFDictionaryGetValue(properties, kCGImagePropertyPixelWidth);
if (val) CFNumberGetValue(val, kCFNumberLongType, &width);
val = CFDictionaryGetValue(properties, kCGImagePropertyOrientation);
if (val) CFNumberGetValue(val, kCFNumberNSIntegerType, &orientationValue);
CFRelease(properties);
// When we draw to Core Graphics, we lose orientation information,
// which means the image below born of initWithCGIImage will be
// oriented incorrectly sometimes. (Unlike the image born of initWithData
// in connectionDidFinishLoading.) So save it here and pass it on later.
orientation = [[self class] orientationFromPropertyValue:(orientationValue == -1 ? 1 : orientationValue)];
}
}
if (width + height > 0 && totalSize < self.expectedSize)
{
if (width + height > 0 && totalSize < self.expectedSize) {
// Create the image
CGImageRef partialImageRef = CGImageSourceCreateImageAtIndex(imageSource, 0, NULL);
#ifdef TARGET_OS_IPHONE
// Workaround for iOS anamorphic image
if (partialImageRef)
{
if (partialImageRef) {
const size_t partialHeight = CGImageGetHeight(partialImageRef);
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGContextRef bmContext = CGBitmapContextCreate(NULL, width, height, 8, width * 4, colorSpace, kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedFirst);
CGColorSpaceRelease(colorSpace);
if (bmContext)
{
if (bmContext) {
CGContextDrawImage(bmContext, (CGRect){.origin.x = 0.0f, .origin.y = 0.0f, .size.width = width, .size.height = partialHeight}, partialImageRef);
CGImageRelease(partialImageRef);
partialImageRef = CGBitmapContextCreateImage(bmContext);
CGContextRelease(bmContext);
}
else
{
else {
CGImageRelease(partialImageRef);
partialImageRef = nil;
}
}
#endif
if (partialImageRef)
{
UIImage *image = [UIImage imageWithCGImage:partialImageRef];
if (partialImageRef) {
UIImage *image = [UIImage imageWithCGImage:partialImageRef scale:1 orientation:orientation];
UIImage *scaledImage = [self scaledImageForKey:self.request.URL.absoluteString image:image];
image = [UIImage decodedImageWithImage:scaledImage];
CGImageRelease(partialImageRef);
dispatch_main_sync_safe(^
{
if (self.completedBlock)
{
dispatch_main_sync_safe(^{
if (self.completedBlock) {
self.completedBlock(image, nil, nil, NO);
}
});
@ -308,19 +275,39 @@
CFRelease(imageSource);
}
if (self.progressBlock)
{
if (self.progressBlock) {
self.progressBlock(self.imageData.length, self.expectedSize);
}
}
- (UIImage *)scaledImageForKey:(NSString *)key image:(UIImage *)image
{
+ (UIImageOrientation)orientationFromPropertyValue:(NSInteger)value {
switch (value) {
case 1:
return UIImageOrientationUp;
case 3:
return UIImageOrientationDown;
case 8:
return UIImageOrientationLeft;
case 6:
return UIImageOrientationRight;
case 2:
return UIImageOrientationUpMirrored;
case 4:
return UIImageOrientationDownMirrored;
case 5:
return UIImageOrientationLeftMirrored;
case 7:
return UIImageOrientationRightMirrored;
default:
return UIImageOrientationUp;
}
}
- (UIImage *)scaledImageForKey:(NSString *)key image:(UIImage *)image {
return SDScaledImageForKey(key, image);
}
- (void)connectionDidFinishLoading:(NSURLConnection *)aConnection
{
- (void)connectionDidFinishLoading:(NSURLConnection *)aConnection {
CFRunLoopStop(CFRunLoopGetCurrent());
self.connection = nil;
@ -328,16 +315,13 @@
SDWebImageDownloaderCompletedBlock completionBlock = self.completedBlock;
if (completionBlock)
{
if (self.options & SDWebImageDownloaderIgnoreCachedResponse && responseFromCached)
{
if (completionBlock) {
if (self.options & SDWebImageDownloaderIgnoreCachedResponse && responseFromCached) {
completionBlock(nil, nil, nil, YES);
self.completionBlock = nil;
[self done];
}
else
{
else {
UIImage *image = [UIImage sd_imageWithData:self.imageData];
@ -348,66 +332,54 @@
image = [UIImage decodedImageWithImage:image];
}
if (CGSizeEqualToSize(image.size, CGSizeZero))
{
completionBlock(nil, nil, [NSError errorWithDomain:@"SDWebImageErrorDomain" code:0 userInfo:@{NSLocalizedDescriptionKey: @"Downloaded image has 0 pixels"}], YES);
if (CGSizeEqualToSize(image.size, CGSizeZero)) {
completionBlock(nil, nil, [NSError errorWithDomain:@"SDWebImageErrorDomain" code:0 userInfo:@{NSLocalizedDescriptionKey : @"Downloaded image has 0 pixels"}], YES);
}
else
{
else {
completionBlock(image, self.imageData, nil, YES);
}
self.completionBlock = nil;
[self done];
}
}
else
{
else {
[self done];
}
}
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
CFRunLoopStop(CFRunLoopGetCurrent());
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:nil];
if (self.completedBlock)
{
if (self.completedBlock) {
self.completedBlock(nil, nil, error, YES);
}
[self done];
}
- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse
{
- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse {
responseFromCached = NO; // If this method is called, it means the response wasn't read from cache
if (self.request.cachePolicy == NSURLRequestReloadIgnoringLocalCacheData)
{
if (self.request.cachePolicy == NSURLRequestReloadIgnoringLocalCacheData) {
// Prevents caching of responses
return nil;
}
else
{
else {
return cachedResponse;
}
}
- (BOOL)shouldContinueWhenAppEntersBackground
{
- (BOOL)shouldContinueWhenAppEntersBackground {
return self.options & SDWebImageDownloaderContinueInBackground;
}
- (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace
{
- (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace {
return [protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust];
}
- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
{
- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {
BOOL trustAllCertificates = (self.options & SDWebImageDownloaderAllowInvalidSSLCertificates);
if (trustAllCertificates && [challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust])
{
if (trustAllCertificates && [challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
[challenge.sender useCredential:[NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]
forAuthenticationChallenge:challenge];
}

View file

@ -11,27 +11,26 @@
#import "SDWebImageDownloader.h"
#import "SDImageCache.h"
typedef enum
{
typedef NS_OPTIONS(NSUInteger, SDWebImageOptions) {
/**
* By default, when a URL fail to be downloaded, the URL is blacklisted so the library won't keep trying.
* This flag disable this blacklisting.
*/
SDWebImageRetryFailed = 1 << 0,
SDWebImageRetryFailed = 1 << 0,
/**
* By default, image downloads are started during UI interactions, this flags disable this feature,
* leading to delayed download on UIScrollView deceleration for instance.
*/
SDWebImageLowPriority = 1 << 1,
SDWebImageLowPriority = 1 << 1,
/**
* This flag disables on-disk caching
*/
SDWebImageCacheMemoryOnly = 1 << 2,
SDWebImageCacheMemoryOnly = 1 << 2,
/**
* This flag enables progressive download, the image is displayed progressively during download as a browser would do.
* By default, the image is only displayed once completely downloaded.
*/
SDWebImageProgressiveDownload = 1 << 3,
SDWebImageProgressiveDownload = 1 << 3,
/**
* Even if the image is cached, respect the HTTP response cache control, and refresh the image from remote location if needed.
* The disk caching will be handled by NSURLCache instead of SDWebImage leading to slight performance degradation.
@ -40,26 +39,27 @@ typedef enum
*
* Use this flag only if you can't make your URLs static with embeded cache busting parameter.
*/
SDWebImageRefreshCached = 1 << 4,
SDWebImageRefreshCached = 1 << 4,
/**
* In iOS 4+, continue the download of the image if the app goes to background. This is achieved by asking the system for
* extra time in background to let the request finish. If the background task expires the operation will be cancelled.
*/
SDWebImageContinueInBackground = 1 << 5,
SDWebImageContinueInBackground = 1 << 5,
/**
* Handles cookies stored in NSHTTPCookieStore by setting
* NSMutableURLRequest.HTTPShouldHandleCookies = YES;
*/
SDWebImageHandleCookies = 1 << 6,
SDWebImageHandleCookies = 1 << 6,
/**
* Enable to allow untrusted SSL ceriticates.
* Useful for testing purposes. Use with caution in production.
*/
SDWebImageAllowInvalidSSLCertificates = 1 << 7
} SDWebImageOptions;
SDWebImageAllowInvalidSSLCertificates = 1 << 7
};
typedef void(^SDWebImageCompletedBlock)(UIImage *image, NSError *error, SDImageCacheType cacheType);
typedef void(^SDWebImageCompletedWithFinishedBlock)(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished);
@ -119,7 +119,7 @@ SDWebImageManager *manager = [SDWebImageManager sharedManager];
*/
@interface SDWebImageManager : NSObject
@property (weak, nonatomic) id<SDWebImageManagerDelegate> delegate;
@property (weak, nonatomic) id <SDWebImageManagerDelegate> delegate;
@property (strong, nonatomic, readonly) SDImageCache *imageCache;
@property (strong, nonatomic, readonly) SDWebImageDownloader *imageDownloader;
@ -172,10 +172,10 @@ SDWebImageManager *manager = [SDWebImageManager sharedManager];
*
* @return Returns a cancellable NSOperation
*/
- (id<SDWebImageOperation>)downloadWithURL:(NSURL *)url
options:(SDWebImageOptions)options
progress:(SDWebImageDownloaderProgressBlock)progressBlock
completed:(SDWebImageCompletedWithFinishedBlock)completedBlock;
- (id <SDWebImageOperation>)downloadWithURL:(NSURL *)url
options:(SDWebImageOptions)options
progress:(SDWebImageDownloaderProgressBlock)progressBlock
completed:(SDWebImageCompletedWithFinishedBlock)completedBlock;
/**
* Cancel all current opreations

View file

@ -7,7 +7,6 @@
*/
#import "SDWebImageManager.h"
#import "UIImage+GIF.h"
#import <objc/message.h>
@interface SDWebImageCombinedOperation : NSObject <SDWebImageOperation>
@ -29,110 +28,91 @@
@implementation SDWebImageManager
+ (id)sharedManager
{
+ (id)sharedManager {
static dispatch_once_t once;
static id instance;
dispatch_once(&once, ^{instance = self.new;});
dispatch_once(&once, ^{
instance = [self new];
});
return instance;
}
- (id)init
{
if ((self = [super init]))
{
- (id)init {
if ((self = [super init])) {
_imageCache = [self createCache];
_imageDownloader = SDWebImageDownloader.new;
_failedURLs = NSMutableArray.new;
_runningOperations = NSMutableArray.new;
_imageDownloader = [SDWebImageDownloader new];
_failedURLs = [NSMutableArray new];
_runningOperations = [NSMutableArray new];
}
return self;
}
- (SDImageCache *)createCache
{
- (SDImageCache *)createCache {
return [SDImageCache sharedImageCache];
}
- (NSString *)cacheKeyForURL:(NSURL *)url
{
if (self.cacheKeyFilter)
{
- (NSString *)cacheKeyForURL:(NSURL *)url {
if (self.cacheKeyFilter) {
return self.cacheKeyFilter(url);
}
else
{
else {
return [url absoluteString];
}
}
- (BOOL)diskImageExistsForURL:(NSURL *)url
{
- (BOOL)diskImageExistsForURL:(NSURL *)url {
NSString *key = [self cacheKeyForURL:url];
return [self.imageCache diskImageExistsWithKey:key];
}
- (id<SDWebImageOperation>)downloadWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedWithFinishedBlock)completedBlock
{
- (id <SDWebImageOperation>)downloadWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedWithFinishedBlock)completedBlock {
// Invoking this method without a completedBlock is pointless
NSParameterAssert(completedBlock);
// Very common mistake is to send the URL using NSString object instead of NSURL. For some strange reason, XCode won't
// throw any warning for this type mismatch. Here we failsafe this error by allowing URLs to be passed as NSString.
if ([url isKindOfClass:NSString.class])
{
if ([url isKindOfClass:NSString.class]) {
url = [NSURL URLWithString:(NSString *)url];
}
// Prevents app crashing on argument type error like sending NSNull instead of NSURL
if (![url isKindOfClass:NSURL.class])
{
if (![url isKindOfClass:NSURL.class]) {
url = nil;
}
__block SDWebImageCombinedOperation *operation = SDWebImageCombinedOperation.new;
__block SDWebImageCombinedOperation *operation = [SDWebImageCombinedOperation new];
__weak SDWebImageCombinedOperation *weakOperation = operation;
BOOL isFailedUrl = NO;
@synchronized(self.failedURLs)
{
@synchronized (self.failedURLs) {
isFailedUrl = [self.failedURLs containsObject:url];
}
if (!url || (!(options & SDWebImageRetryFailed) && isFailedUrl))
{
dispatch_main_sync_safe(^
{
NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorFileDoesNotExist userInfo:nil];
completedBlock(nil, error, SDImageCacheTypeNone, YES);
if (!url || (!(options & SDWebImageRetryFailed) && isFailedUrl)) {
dispatch_main_sync_safe(^{
NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorFileDoesNotExist userInfo:nil];
completedBlock(nil, error, SDImageCacheTypeNone, YES);
});
return operation;
}
@synchronized(self.runningOperations)
{
@synchronized (self.runningOperations) {
[self.runningOperations addObject:operation];
}
NSString *key = [self cacheKeyForURL:url];
operation.cacheOperation = [self.imageCache queryDiskCacheForKey:key done:^(UIImage *image, SDImageCacheType cacheType)
{
if (operation.isCancelled)
{
@synchronized(self.runningOperations)
{
operation.cacheOperation = [self.imageCache queryDiskCacheForKey:key done:^(UIImage *image, SDImageCacheType cacheType) {
if (operation.isCancelled) {
@synchronized (self.runningOperations) {
[self.runningOperations removeObject:operation];
}
return;
}
if ((!image || options & SDWebImageRefreshCached) && (![self.delegate respondsToSelector:@selector(imageManager:shouldDownloadImageForURL:)] || [self.delegate imageManager:self shouldDownloadImageForURL:url]))
{
if (image && options & SDWebImageRefreshCached)
{
dispatch_main_sync_safe(^
{
if ((!image || options & SDWebImageRefreshCached) && (![self.delegate respondsToSelector:@selector(imageManager:shouldDownloadImageForURL:)] || [self.delegate imageManager:self shouldDownloadImageForURL:url])) {
if (image && options & SDWebImageRefreshCached) {
dispatch_main_sync_safe(^{
// If image was found in the cache bug SDWebImageRefreshCached is provided, notify about the cached image
// AND try to re-download it in order to let a chance to NSURLCache to refresh it from server.
completedBlock(image, nil, cacheType, YES);
@ -147,108 +127,85 @@
if (options & SDWebImageContinueInBackground) downloaderOptions |= SDWebImageDownloaderContinueInBackground;
if (options & SDWebImageHandleCookies) downloaderOptions |= SDWebImageDownloaderHandleCookies;
if (options & SDWebImageAllowInvalidSSLCertificates) downloaderOptions |= SDWebImageDownloaderAllowInvalidSSLCertificates;
if (image && options & SDWebImageRefreshCached)
{
if (image && options & SDWebImageRefreshCached) {
// force progressive off if image already cached but forced refreshing
downloaderOptions &= ~SDWebImageDownloaderProgressiveDownload;
// ignore image read from NSURLCache if image if cached but force refreshing
downloaderOptions |= SDWebImageDownloaderIgnoreCachedResponse;
}
id<SDWebImageOperation> subOperation = [self.imageDownloader downloadImageWithURL:url options:downloaderOptions progress:progressBlock completed:^(UIImage *downloadedImage, NSData *data, NSError *error, BOOL finished)
{
if (weakOperation.isCancelled)
{
dispatch_main_sync_safe(^
{
id <SDWebImageOperation> subOperation = [self.imageDownloader downloadImageWithURL:url options:downloaderOptions progress:progressBlock completed:^(UIImage *downloadedImage, NSData *data, NSError *error, BOOL finished) {
if (weakOperation.isCancelled) {
dispatch_main_sync_safe(^{
completedBlock(nil, nil, SDImageCacheTypeNone, finished);
});
}
else if (error)
{
dispatch_main_sync_safe(^
{
else if (error) {
dispatch_main_sync_safe(^{
completedBlock(nil, error, SDImageCacheTypeNone, finished);
});
if (error.code != NSURLErrorNotConnectedToInternet)
{
@synchronized(self.failedURLs)
{
if (error.code != NSURLErrorNotConnectedToInternet) {
@synchronized (self.failedURLs) {
[self.failedURLs addObject:url];
}
}
}
else
{
else {
BOOL cacheOnDisk = !(options & SDWebImageCacheMemoryOnly);
if (options & SDWebImageRefreshCached && image && !downloadedImage)
{
if (options & SDWebImageRefreshCached && image && !downloadedImage) {
// Image refresh hit the NSURLCache cache, do not call the completion block
}
// NOTE: We don't call transformDownloadedImage delegate method on animated images as most transformation code would mangle it
else if (downloadedImage && !downloadedImage.images && [self.delegate respondsToSelector:@selector(imageManager:transformDownloadedImage:withURL:)])
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^
{
// NOTE: We don't call transformDownloadedImage delegate method on animated images as most transformation code would mangle it
else if (downloadedImage && !downloadedImage.images && [self.delegate respondsToSelector:@selector(imageManager:transformDownloadedImage:withURL:)]) {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
UIImage *transformedImage = [self.delegate imageManager:self transformDownloadedImage:downloadedImage withURL:url];
dispatch_main_sync_safe(^
{
dispatch_main_sync_safe(^{
completedBlock(transformedImage, nil, SDImageCacheTypeNone, finished);
});
if (transformedImage && finished)
{
if (transformedImage && finished) {
BOOL imageWasTransformed = ![transformedImage isEqual:downloadedImage];
[self.imageCache storeImage:transformedImage recalculateFromImage:imageWasTransformed imageData:data forKey:key toDisk:cacheOnDisk];
}
});
}
else
{
dispatch_main_sync_safe(^
{
else {
dispatch_main_sync_safe(^{
completedBlock(downloadedImage, nil, SDImageCacheTypeNone, finished);
});
if (downloadedImage && finished)
{
if (downloadedImage && finished) {
[self.imageCache storeImage:downloadedImage recalculateFromImage:NO imageData:data forKey:key toDisk:cacheOnDisk];
}
}
}
if (finished)
{
@synchronized(self.runningOperations)
{
if (finished) {
@synchronized (self.runningOperations) {
[self.runningOperations removeObject:operation];
}
}
}];
operation.cancelBlock = ^{[subOperation cancel];};
operation.cancelBlock = ^{
[subOperation cancel];
};
}
else if (image)
{
dispatch_main_sync_safe(^
{
else if (image) {
dispatch_main_sync_safe(^{
completedBlock(image, nil, cacheType, YES);
});
@synchronized(self.runningOperations)
{
@synchronized (self.runningOperations) {
[self.runningOperations removeObject:operation];
}
}
else
{
else {
// Image not in cache and download disallowed by delegate
dispatch_main_sync_safe(^
{
dispatch_main_sync_safe(^{
completedBlock(nil, nil, SDImageCacheTypeNone, YES);
});
@synchronized(self.runningOperations)
{
@synchronized (self.runningOperations) {
[self.runningOperations removeObject:operation];
}
}
@ -257,17 +214,14 @@
return operation;
}
- (void)cancelAll
{
@synchronized(self.runningOperations)
{
- (void)cancelAll {
@synchronized (self.runningOperations) {
[self.runningOperations makeObjectsPerformSelector:@selector(cancel)];
[self.runningOperations removeAllObjects];
}
}
- (BOOL)isRunning
{
- (BOOL)isRunning {
return self.runningOperations.count > 0;
}
@ -275,28 +229,22 @@
@implementation SDWebImageCombinedOperation
- (void)setCancelBlock:(void (^)())cancelBlock
{
if (self.isCancelled)
{
- (void)setCancelBlock:(void (^)())cancelBlock {
if (self.isCancelled) {
if (cancelBlock) cancelBlock();
}
else
{
else {
_cancelBlock = [cancelBlock copy];
}
}
- (void)cancel
{
- (void)cancel {
self.cancelled = YES;
if (self.cacheOperation)
{
if (self.cacheOperation) {
[self.cacheOperation cancel];
self.cacheOperation = nil;
}
if (self.cancelBlock)
{
if (self.cancelBlock) {
self.cancelBlock();
self.cancelBlock = nil;
}

View file

@ -23,7 +23,7 @@
* @param finishedCount The total number of images that were prefetched
* @param totalCount The total number of images that need to be prefetched
*/
- (void)imagePrefetcher:(SDWebImagePrefetcher*)imagePrefetcher didPrefetchURL:(NSURL*)imageURL finishedCount:(NSUInteger)finishedCount totalCount:(NSUInteger)totalCount;
- (void)imagePrefetcher:(SDWebImagePrefetcher *)imagePrefetcher didPrefetchURL:(NSURL *)imageURL finishedCount:(NSUInteger)finishedCount totalCount:(NSUInteger)totalCount;
/**
* Called when all images are prefetched.
@ -31,7 +31,7 @@
* @param totalCount The total number of images that need to be prefetched
* @param skippedCount The total number of images that were skipped
*/
- (void)imagePrefetcher:(SDWebImagePrefetcher*)imagePrefetcher didFinishWithTotalCount:(NSUInteger)totalCount skippedCount:(NSUInteger)skippedCount;
- (void)imagePrefetcher:(SDWebImagePrefetcher *)imagePrefetcher didFinishWithTotalCount:(NSUInteger)totalCount skippedCount:(NSUInteger)skippedCount;
@end
@ -51,7 +51,7 @@
*/
@property (nonatomic, assign) SDWebImageOptions options;
@property (weak, nonatomic) id<SDWebImagePrefetcherDelegate> delegate;
@property (weak, nonatomic) id <SDWebImagePrefetcherDelegate> delegate;
/**
* Return the global image prefetcher instance.
@ -73,9 +73,10 @@
* and skips images for failed downloads and proceed to the next image in the list
*
* @param urls list of URLs to prefetch
* @param progressBlock block to be called when progress updates
* @param completionBlock block to be called when prefetching is completed
*/
- (void)prefetchURLs:(NSArray *)urls completed:(void (^)(NSUInteger finishedCount, NSUInteger skippedCount))completionBlock;
- (void)prefetchURLs:(NSArray *)urls progress:(void (^)(NSUInteger, NSUInteger))progressBlock completed:(void (^)(NSUInteger, NSUInteger))completionBlock;
/**
* Remove and cancel queued list

View file

@ -7,7 +7,6 @@
*/
#import "SDWebImagePrefetcher.h"
#import "SDWebImageManager.h"
@interface SDWebImagePrefetcher ()
@ -18,57 +17,53 @@
@property (assign, nonatomic) NSUInteger finishedCount;
@property (assign, nonatomic) NSTimeInterval startedTime;
@property (copy, nonatomic) void (^completionBlock)(NSUInteger, NSUInteger);
@property (copy, nonatomic) void (^progressBlock)(NSUInteger, NSUInteger);
@end
@implementation SDWebImagePrefetcher
+ (SDWebImagePrefetcher *)sharedImagePrefetcher
{
+ (SDWebImagePrefetcher *)sharedImagePrefetcher {
static dispatch_once_t once;
static id instance;
dispatch_once(&once, ^{instance = self.new;});
dispatch_once(&once, ^{
instance = [self new];
});
return instance;
}
- (id)init
{
if ((self = [super init]))
{
_manager = SDWebImageManager.new;
- (id)init {
if ((self = [super init])) {
_manager = [SDWebImageManager new];
_options = SDWebImageLowPriority;
self.maxConcurrentDownloads = 3;
}
return self;
}
- (void)setMaxConcurrentDownloads:(NSUInteger)maxConcurrentDownloads
{
- (void)setMaxConcurrentDownloads:(NSUInteger)maxConcurrentDownloads {
self.manager.imageDownloader.maxConcurrentDownloads = maxConcurrentDownloads;
}
- (NSUInteger)maxConcurrentDownloads
{
- (NSUInteger)maxConcurrentDownloads {
return self.manager.imageDownloader.maxConcurrentDownloads;
}
- (void)startPrefetchingAtIndex:(NSUInteger)index
{
- (void)startPrefetchingAtIndex:(NSUInteger)index {
if (index >= self.prefetchURLs.count) return;
self.requestedCount++;
[self.manager downloadWithURL:self.prefetchURLs[index] options:self.options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished)
{
[self.manager downloadWithURL:self.prefetchURLs[index] options:self.options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished) {
if (!finished) return;
self.finishedCount++;
if (image)
{
if (image) {
self.progressBlock(self.finishedCount,[self.prefetchURLs count]);
#ifdef SD_VERBOSE
NSLog(@"Prefetched %d out of %d", self.finishedCount, self.prefetchURLs.count);
#endif
}
else
{
else {
self.progressBlock(self.finishedCount,[self.prefetchURLs count]);
#ifdef SD_VERBOSE
NSLog(@"Prefetched %d out of %d (Failed)", self.finishedCount, [self.prefetchURLs count]);
#endif
@ -76,24 +71,20 @@
// Add last failed
self.skippedCount++;
}
if ([self.delegate respondsToSelector:@selector(imagePrefetcher:didPrefetchURL:finishedCount:totalCount:)])
{
if ([self.delegate respondsToSelector:@selector(imagePrefetcher:didPrefetchURL:finishedCount:totalCount:)]) {
[self.delegate imagePrefetcher:self
didPrefetchURL:self.prefetchURLs[index]
finishedCount:self.finishedCount
totalCount:self.prefetchURLs.count
];
];
}
if (self.prefetchURLs.count > self.requestedCount)
{
if (self.prefetchURLs.count > self.requestedCount) {
[self startPrefetchingAtIndex:self.requestedCount];
}
else if (self.finishedCount == self.requestedCount)
{
else if (self.finishedCount + self.skippedCount == self.requestedCount) {
[self reportStatus];
if (self.completionBlock)
{
if (self.completionBlock) {
self.completionBlock(self.finishedCount, self.skippedCount);
self.completionBlock = nil;
}
@ -101,43 +92,38 @@
}];
}
- (void)reportStatus
{
- (void)reportStatus {
NSUInteger total = [self.prefetchURLs count];
#ifdef SD_VERBOSE
NSLog(@"Finished prefetching (%d successful, %d skipped, timeElasped %.2f)", total - self.skippedCount, self.skippedCount, CFAbsoluteTimeGetCurrent() - self.startedTime);
#endif
if ([self.delegate respondsToSelector:@selector(imagePrefetcher:didFinishWithTotalCount:skippedCount:)])
{
if ([self.delegate respondsToSelector:@selector(imagePrefetcher:didFinishWithTotalCount:skippedCount:)]) {
[self.delegate imagePrefetcher:self
didFinishWithTotalCount:(total - self.skippedCount)
skippedCount:self.skippedCount
];
];
}
}
- (void)prefetchURLs:(NSArray *)urls
{
[self prefetchURLs:urls completed:nil];
- (void)prefetchURLs:(NSArray *)urls {
[self prefetchURLs:urls progress:nil completed:nil];
}
- (void)prefetchURLs:(NSArray *)urls completed:(void (^)(NSUInteger, NSUInteger))completionBlock
{
- (void)prefetchURLs:(NSArray *)urls progress:(void (^)(NSUInteger, NSUInteger))progressBlock completed:(void (^)(NSUInteger, NSUInteger))completionBlock {
[self cancelPrefetching]; // Prevent duplicate prefetch request
self.startedTime = CFAbsoluteTimeGetCurrent();
self.prefetchURLs = urls;
self.completionBlock = completionBlock;
self.progressBlock = progressBlock;
// Starts prefetching from the very first image on the list with the max allowed concurrency
NSUInteger listCount = self.prefetchURLs.count;
for (NSUInteger i = 0; i < self.maxConcurrentDownloads && self.requestedCount < listCount; i++)
{
for (NSUInteger i = 0; i < self.maxConcurrentDownloads && self.requestedCount < listCount; i++) {
[self startPrefetchingAtIndex:i];
}
}
- (void)cancelPrefetching
{
- (void)cancelPrefetching {
self.prefetchURLs = nil;
self.skippedCount = 0;
self.requestedCount = 0;

View file

@ -13,52 +13,42 @@ static char operationKey;
@implementation UIButton (WebCache)
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state
{
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state {
[self setImageWithURL:url forState:state placeholderImage:nil options:0 completed:nil];
}
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder
{
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder {
[self setImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:nil];
}
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options
{
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options {
[self setImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil];
}
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock
{
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock {
[self setImageWithURL:url forState:state placeholderImage:nil options:0 completed:completedBlock];
}
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock
{
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock {
[self setImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:completedBlock];
}
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock
{
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock {
[self cancelCurrentImageLoad];
[self setImage:placeholder forState:state];
if (url)
{
if (url) {
__weak UIButton *wself = self;
id<SDWebImageOperation> operation = [SDWebImageManager.sharedManager downloadWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished)
{
id <SDWebImageOperation> operation = [SDWebImageManager.sharedManager downloadWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished) {
if (!wself) return;
dispatch_main_sync_safe(^
{
dispatch_main_sync_safe(^{
__strong UIButton *sself = wself;
if (!sself) return;
if (image)
{
if (image) {
[sself setImage:image forState:state];
}
if (completedBlock && finished)
{
if (completedBlock && finished) {
completedBlock(image, error, cacheType);
}
});
@ -67,53 +57,42 @@ static char operationKey;
}
}
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state
{
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state {
[self setBackgroundImageWithURL:url forState:state placeholderImage:nil options:0 completed:nil];
}
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder
{
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder {
[self setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:nil];
}
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options
{
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options {
[self setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil];
}
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock
{
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock {
[self setBackgroundImageWithURL:url forState:state placeholderImage:nil options:0 completed:completedBlock];
}
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock
{
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock {
[self setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:completedBlock];
}
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock
{
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock {
[self cancelCurrentImageLoad];
[self setBackgroundImage:placeholder forState:state];
if (url)
{
if (url) {
__weak UIButton *wself = self;
id<SDWebImageOperation> operation = [SDWebImageManager.sharedManager downloadWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished)
{
id <SDWebImageOperation> operation = [SDWebImageManager.sharedManager downloadWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished) {
if (!wself) return;
dispatch_main_sync_safe(^
{
dispatch_main_sync_safe(^{
__strong UIButton *sself = wself;
if (!sself) return;
if (image)
{
if (image) {
[sself setBackgroundImage:image forState:state];
}
if (completedBlock && finished)
{
if (completedBlock && finished) {
completedBlock(image, error, cacheType);
}
});
@ -123,12 +102,10 @@ static char operationKey;
}
- (void)cancelCurrentImageLoad
{
- (void)cancelCurrentImageLoad {
// Cancel in progress downloader from queue
id<SDWebImageOperation> operation = objc_getAssociatedObject(self, &operationKey);
if (operation)
{
id <SDWebImageOperation> operation = objc_getAssociatedObject(self, &operationKey);
if (operation) {
[operation cancel];
objc_setAssociatedObject(self, &operationKey, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

View file

@ -6,12 +6,12 @@
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import "NSData+GIF.h"
#import <UIKit/UIKit.h>
@interface UIImage (GIF)
+ (UIImage *)sd_animatedGIFNamed:(NSString *)name;
+ (UIImage *)sd_animatedGIFWithData:(NSData *)data;
- (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size;

View file

@ -11,10 +11,8 @@
@implementation UIImage (GIF)
+ (UIImage *)sd_animatedGIFWithData:(NSData *)data
{
if (!data)
{
+ (UIImage *)sd_animatedGIFWithData:(NSData *)data {
if (!data) {
return nil;
}
@ -24,18 +22,15 @@
UIImage *animatedImage;
if (count <= 1)
{
if (count <= 1) {
animatedImage = [[UIImage alloc] initWithData:data];
}
else
{
else {
NSMutableArray *images = [NSMutableArray array];
NSTimeInterval duration = 0.0f;
for (size_t i = 0; i < count; i++)
{
for (size_t i = 0; i < count; i++) {
CGImageRef image = CGImageSourceCreateImageAtIndex(source, i, NULL);
duration += [self frameDurationAtIndex:i source:source];
@ -45,9 +40,8 @@
CGImageRelease(image);
}
if (!duration)
{
duration = (1.0f/10.0f)*count;
if (!duration) {
duration = (1.0f / 10.0f) * count;
}
animatedImage = [UIImage animatedImageWithImages:images duration:duration];
@ -58,24 +52,20 @@
return animatedImage;
}
+ (float)frameDurationAtIndex:(NSUInteger)index source:(CGImageSourceRef)source
{
+ (float)frameDurationAtIndex:(NSUInteger)index source:(CGImageSourceRef)source {
float frameDuration = 0.1f;
CFDictionaryRef cfFrameProperties = CGImageSourceCopyPropertiesAtIndex(source, index, nil);
NSDictionary *frameProperties = (__bridge NSDictionary *)cfFrameProperties;
NSDictionary *gifProperties = frameProperties[(NSString *)kCGImagePropertyGIFDictionary];
NSNumber *delayTimeUnclampedProp = gifProperties[(NSString *)kCGImagePropertyGIFUnclampedDelayTime];
if (delayTimeUnclampedProp)
{
if (delayTimeUnclampedProp) {
frameDuration = [delayTimeUnclampedProp floatValue];
}
else
{
else {
NSNumber *delayTimeProp = gifProperties[(NSString *)kCGImagePropertyGIFDelayTime];
if (delayTimeProp)
{
if (delayTimeProp) {
frameDuration = [delayTimeProp floatValue];
}
}
@ -85,8 +75,7 @@
// a duration of <= 10 ms. See <rdar://problem/7689300> and <http://webkit.org/b/36082>
// for more information.
if (frameDuration < 0.011f)
{
if (frameDuration < 0.011f) {
frameDuration = 0.100f;
}
@ -94,18 +83,15 @@
return frameDuration;
}
+ (UIImage *)sd_animatedGIFNamed:(NSString *)name
{
+ (UIImage *)sd_animatedGIFNamed:(NSString *)name {
CGFloat scale = [UIScreen mainScreen].scale;
if (scale > 1.0f)
{
if (scale > 1.0f) {
NSString *retinaPath = [[NSBundle mainBundle] pathForResource:[name stringByAppendingString:@"@2x"] ofType:@"gif"];
NSData *data = [NSData dataWithContentsOfFile:retinaPath];
if (data)
{
if (data) {
return [UIImage sd_animatedGIFWithData:data];
}
@ -113,21 +99,18 @@
data = [NSData dataWithContentsOfFile:path];
if (data)
{
if (data) {
return [UIImage sd_animatedGIFWithData:data];
}
return [UIImage imageNamed:name];
}
else
{
else {
NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:@"gif"];
NSData *data = [NSData dataWithContentsOfFile:path];
if (data)
{
if (data) {
return [UIImage sd_animatedGIFWithData:data];
}
@ -135,10 +118,8 @@
}
}
- (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size
{
if (CGSizeEqualToSize(self.size, size) || CGSizeEqualToSize(size, CGSizeZero))
{
- (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size {
if (CGSizeEqualToSize(self.size, size) || CGSizeEqualToSize(size, CGSizeZero)) {
return self;
}
@ -147,16 +128,14 @@
CGFloat widthFactor = size.width / self.size.width;
CGFloat heightFactor = size.height / self.size.height;
CGFloat scaleFactor = (widthFactor > heightFactor) ? widthFactor :heightFactor;
CGFloat scaleFactor = (widthFactor > heightFactor) ? widthFactor : heightFactor;
scaledSize.width = self.size.width * scaleFactor;
scaledSize.height = self.size.height * scaleFactor;
if (widthFactor > heightFactor)
{
if (widthFactor > heightFactor) {
thumbnailPoint.y = (size.height - scaledSize.height) * 0.5;
}
else if (widthFactor < heightFactor)
{
else if (widthFactor < heightFactor) {
thumbnailPoint.x = (size.width - scaledSize.width) * 0.5;
}
@ -164,8 +143,7 @@
UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
for (UIImage *image in self.images)
{
for (UIImage *image in self.images) {
[image drawInRect:CGRectMake(thumbnailPoint.x, thumbnailPoint.y, scaledSize.width, scaledSize.height)];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();

View file

@ -8,6 +8,7 @@
#import "UIImage+MultiFormat.h"
#import "UIImage+GIF.h"
#import "NSData+ImageContentType.h"
#ifdef SD_WEBP
#import "UIImage+WebP.h"
@ -15,25 +16,22 @@
@implementation UIImage (MultiFormat)
+ (UIImage *)sd_imageWithData:(NSData *)data
{
+ (UIImage *)sd_imageWithData:(NSData *)data {
UIImage *image;
if ([data sd_isGIF])
{
NSString *imageContentType = [NSData contentTypeForImageData:data];
if ([imageContentType isEqualToString:@"image/gif"]) {
image = [UIImage sd_animatedGIFWithData:data];
}
else
{
image = [[UIImage alloc] initWithData:data];
}
#ifdef SD_WEBP
if (!image) // TODO: detect webp signature
else if ([imageContentType isEqualToString:@"image/webp"])
{
image = [UIImage sd_imageWithWebPData:data];
}
#endif
else {
image = [[UIImage alloc] initWithData:data];
}
return image;
}

View file

@ -139,7 +139,7 @@
*
*@param arrayOfURLs An array of NSURL
*/
-(void)setAnimationImagesWithURLs:(NSArray *)arrayOfURLs;
- (void)setAnimationImagesWithURLs:(NSArray *)arrayOfURLs;
/**
* Cancel the current download

View file

@ -14,58 +14,46 @@ static char operationArrayKey;
@implementation UIImageView (WebCache)
- (void)setImageWithURL:(NSURL *)url
{
- (void)setImageWithURL:(NSURL *)url {
[self setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:nil];
}
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder
{
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder {
[self setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:nil];
}
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options
{
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options {
[self setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:nil];
}
- (void)setImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock
{
- (void)setImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock {
[self setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:completedBlock];
}
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock
{
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock {
[self setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:completedBlock];
}
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock
{
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock {
[self setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock];
}
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock
{
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock {
[self cancelCurrentImageLoad];
self.image = placeholder;
if (url)
{
if (url) {
__weak UIImageView *wself = self;
id<SDWebImageOperation> operation = [SDWebImageManager.sharedManager downloadWithURL:url options:options progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished)
{
id <SDWebImageOperation> operation = [SDWebImageManager.sharedManager downloadWithURL:url options:options progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished) {
if (!wself) return;
dispatch_main_sync_safe(^
{
dispatch_main_sync_safe(^{
if (!wself) return;
if (image)
{
if (image) {
wself.image = image;
[wself setNeedsLayout];
}
if (completedBlock && finished)
{
if (completedBlock && finished) {
completedBlock(image, error, cacheType);
}
});
@ -74,27 +62,21 @@ static char operationArrayKey;
}
}
- (void)setAnimationImagesWithURLs:(NSArray *)arrayOfURLs
{
- (void)setAnimationImagesWithURLs:(NSArray *)arrayOfURLs {
[self cancelCurrentArrayLoad];
__weak UIImageView *wself = self;
NSMutableArray *operationsArray = [[NSMutableArray alloc] init];
for (NSURL *logoImageURL in arrayOfURLs)
{
id<SDWebImageOperation> operation = [SDWebImageManager.sharedManager downloadWithURL:logoImageURL options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished)
{
for (NSURL *logoImageURL in arrayOfURLs) {
id <SDWebImageOperation> operation = [SDWebImageManager.sharedManager downloadWithURL:logoImageURL options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished) {
if (!wself) return;
dispatch_main_sync_safe(^
{
dispatch_main_sync_safe(^{
__strong UIImageView *sself = wself;
[sself stopAnimating];
if (sself && image)
{
if (sself && image) {
NSMutableArray *currentImages = [[sself animationImages] mutableCopy];
if (!currentImages)
{
if (!currentImages) {
currentImages = [[NSMutableArray alloc] init];
}
[currentImages addObject:image];
@ -111,25 +93,20 @@ static char operationArrayKey;
objc_setAssociatedObject(self, &operationArrayKey, [NSArray arrayWithArray:operationsArray], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (void)cancelCurrentImageLoad
{
- (void)cancelCurrentImageLoad {
// Cancel in progress downloader from queue
id<SDWebImageOperation> operation = objc_getAssociatedObject(self, &operationKey);
if (operation)
{
id <SDWebImageOperation> operation = objc_getAssociatedObject(self, &operationKey);
if (operation) {
[operation cancel];
objc_setAssociatedObject(self, &operationKey, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
}
- (void)cancelCurrentArrayLoad
{
- (void)cancelCurrentArrayLoad {
// Cancel in progress downloader from queue
NSArray *operations = objc_getAssociatedObject(self, &operationArrayKey);
for (id<SDWebImageOperation> operation in operations)
{
if (operation)
{
for (id <SDWebImageOperation> operation in operations) {
if (operation) {
[operation cancel];
}
}

2
Pods/iRate/LICENCE.md generated
View file

@ -1,6 +1,6 @@
iRate
Version 1.9.2, January 21st, 2014
Version 1.9.3, February 5th, 2014
Copyright (C) 2011 Charcoal Design

View file

@ -1,6 +1,6 @@
"iRateMessageTitle" = "Đánh giá %@";
"iRateAppMessage" = "Nếu bạn thích sử dụng %@, bạn có muốn giành một chút thời gian để đánh giá nó? Sẽ không lâu hơn một phút. Cảm ơn sự hỗ trợ của bạn!";
"iRateGameMessage" = "Nếu bạn thích chơi %@, bạn có muốn giành một chút thời gian để đánh giá nó? Sẽ không lâu hơn một phút. Cảm ơn hỗ trợ của bạn!";
"iRateAppMessage" = "Nếu thích sử dụng %@, bạn có muốn giành một chút thời gian để đánh giá nó? Sẽ không lâu hơn một phút. Cảm ơn sự hỗ trợ của bạn!";
"iRateGameMessage" = "Nếu thích chơi %@, bạn có muốn giành một chút thời gian để đánh giá nó? Sẽ không lâu hơn một phút. Cảm ơn sự hỗ trợ của bạn!";
"iRateCancelButton" = "Không, Cảm ơn";
"iRateRateButton" = "Đánh Giá Ngay";
"iRateRemindButton" = "Nhắc Tôi Sau";

View file

@ -1,7 +1,7 @@
//
// iRate.h
//
// Version 1.9.2
// Version 1.9.3
//
// Created by Nick Lockwood on 26/01/2011.
// Copyright 2011 Charcoal Design

View file

@ -1,7 +1,7 @@
//
// iRate.m
//
// Version 1.9.2
// Version 1.9.3
//
// Created by Nick Lockwood on 26/01/2011.
// Copyright 2011 Charcoal Design
@ -275,7 +275,7 @@ static NSString *const iRateMacAppStoreURLFormat = @"macappstore://itunes.apple.
return _ratingsURL;
}
if (!self.appStoreID)
if (!self.appStoreID && self.verboseLogging)
{
NSLog(@"iRate could not find the App Store ID for this application. If the application is not intended for App Store release then you must specify a custom ratingsURL.");
}

View file

@ -23,22 +23,6 @@
CD490A2718A1628700CFECE0 /* OARequestParameter.m in Sources */ = {isa = PBXBuildFile; fileRef = CD490A1418A1628700CFECE0 /* OARequestParameter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
CD490A2818A1628700CFECE0 /* OAServiceTicket.m in Sources */ = {isa = PBXBuildFile; fileRef = CD490A1618A1628700CFECE0 /* OAServiceTicket.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
CD490A2918A1628700CFECE0 /* OAToken.m in Sources */ = {isa = PBXBuildFile; fileRef = CD490A1918A1628700CFECE0 /* OAToken.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
CD490A4A18A1639600CFECE0 /* TSAVDemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CD490A3318A1639600CFECE0 /* TSAVDemoAppDelegate.m */; };
CD490A4B18A1639600CFECE0 /* TSAVDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD490A3518A1639600CFECE0 /* TSAVDemoViewController.m */; };
CD490A4C18A1639600CFECE0 /* TSAVDemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD490A3618A1639600CFECE0 /* TSAVDemoViewController.xib */; };
CD490A4D18A1639600CFECE0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CD490A3718A1639600CFECE0 /* main.m */; };
CD490A4E18A1639600CFECE0 /* MainWindow-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD490A3818A1639600CFECE0 /* MainWindow-iPad.xib */; };
CD490A4F18A1639600CFECE0 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD490A3918A1639600CFECE0 /* MainWindow.xib */; };
CD490A5018A1639600CFECE0 /* TSAVDemo-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = CD490A3A18A1639600CFECE0 /* TSAVDemo-Info.plist */; };
CD490A5118A1639600CFECE0 /* README.mdown in Resources */ = {isa = PBXBuildFile; fileRef = CD490A3F18A1639600CFECE0 /* README.mdown */; };
CD490A5218A1639600CFECE0 /* Source Code License.rtf in Resources */ = {isa = PBXBuildFile; fileRef = CD490A4018A1639600CFECE0 /* Source Code License.rtf */; };
CD490A5318A1639600CFECE0 /* TSAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = CD490A4318A1639600CFECE0 /* TSAlertView.m */; };
CD490A5418A1639600CFECE0 /* TSAlertViewBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = CD490A4418A1639600CFECE0 /* TSAlertViewBackground.png */; };
CD490A5518A1639600CFECE0 /* TSAlertViewBackground2.png in Resources */ = {isa = PBXBuildFile; fileRef = CD490A4518A1639600CFECE0 /* TSAlertViewBackground2.png */; };
CD490A5618A1639600CFECE0 /* TSAlertViewButtonBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = CD490A4618A1639600CFECE0 /* TSAlertViewButtonBackground.png */; };
CD490A5718A1639600CFECE0 /* TSAlertViewButtonBackground_Highlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = CD490A4718A1639600CFECE0 /* TSAlertViewButtonBackground_Highlighted.png */; };
CD490A5818A1639600CFECE0 /* TSAlertViewCancelButtonBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = CD490A4818A1639600CFECE0 /* TSAlertViewCancelButtonBackground.png */; };
CD490A5918A1639600CFECE0 /* TSAlertViewMessageListViewShadow.png in Resources */ = {isa = PBXBuildFile; fileRef = CD490A4918A1639600CFECE0 /* TSAlertViewMessageListViewShadow.png */; };
CDD9E4F818A144E4006EEC0D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDD9E4F718A144E4006EEC0D /* Foundation.framework */; };
CDD9E4FA18A144E4006EEC0D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDD9E4F918A144E4006EEC0D /* CoreGraphics.framework */; };
CDD9E4FC18A144E4006EEC0D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDD9E4FB18A144E4006EEC0D /* UIKit.framework */; };
@ -175,13 +159,6 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
CD490A5B18A1639600CFECE0 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = CD490A3B18A1639600CFECE0 /* TSAVDemo.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 1D6058910D05DD3D006BFB54;
remoteInfo = TSAVDemo;
};
CDD9E51A18A144E4006EEC0D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = CDD9E4EC18A144E4006EEC0D /* Project object */;
@ -225,27 +202,6 @@
CD490A1818A1628700CFECE0 /* OAToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OAToken.h; sourceTree = "<group>"; };
CD490A1918A1628700CFECE0 /* OAToken.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OAToken.m; sourceTree = "<group>"; };
CD490A1A18A1628700CFECE0 /* OAuthConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OAuthConsumer.h; sourceTree = "<group>"; };
CD490A3218A1639600CFECE0 /* TSAVDemoAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSAVDemoAppDelegate.h; sourceTree = "<group>"; };
CD490A3318A1639600CFECE0 /* TSAVDemoAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSAVDemoAppDelegate.m; sourceTree = "<group>"; };
CD490A3418A1639600CFECE0 /* TSAVDemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSAVDemoViewController.h; sourceTree = "<group>"; };
CD490A3518A1639600CFECE0 /* TSAVDemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSAVDemoViewController.m; sourceTree = "<group>"; };
CD490A3618A1639600CFECE0 /* TSAVDemoViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TSAVDemoViewController.xib; sourceTree = "<group>"; };
CD490A3718A1639600CFECE0 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
CD490A3818A1639600CFECE0 /* MainWindow-iPad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "MainWindow-iPad.xib"; sourceTree = "<group>"; };
CD490A3918A1639600CFECE0 /* MainWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
CD490A3A18A1639600CFECE0 /* TSAVDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TSAVDemo-Info.plist"; sourceTree = "<group>"; };
CD490A3B18A1639600CFECE0 /* TSAVDemo.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = TSAVDemo.xcodeproj; sourceTree = "<group>"; };
CD490A3E18A1639600CFECE0 /* TSAVDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSAVDemo_Prefix.pch; sourceTree = "<group>"; };
CD490A3F18A1639600CFECE0 /* README.mdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.mdown; sourceTree = "<group>"; };
CD490A4018A1639600CFECE0 /* Source Code License.rtf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.rtf; path = "Source Code License.rtf"; sourceTree = "<group>"; };
CD490A4218A1639600CFECE0 /* TSAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSAlertView.h; sourceTree = "<group>"; };
CD490A4318A1639600CFECE0 /* TSAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSAlertView.m; sourceTree = "<group>"; };
CD490A4418A1639600CFECE0 /* TSAlertViewBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewBackground.png; sourceTree = "<group>"; };
CD490A4518A1639600CFECE0 /* TSAlertViewBackground2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewBackground2.png; sourceTree = "<group>"; };
CD490A4618A1639600CFECE0 /* TSAlertViewButtonBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewButtonBackground.png; sourceTree = "<group>"; };
CD490A4718A1639600CFECE0 /* TSAlertViewButtonBackground_Highlighted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewButtonBackground_Highlighted.png; sourceTree = "<group>"; };
CD490A4818A1639600CFECE0 /* TSAlertViewCancelButtonBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewCancelButtonBackground.png; sourceTree = "<group>"; };
CD490A4918A1639600CFECE0 /* TSAlertViewMessageListViewShadow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewMessageListViewShadow.png; sourceTree = "<group>"; };
CDD9E4F418A144E4006EEC0D /* Trovebox.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Trovebox.app; sourceTree = BUILT_PRODUCTS_DIR; };
CDD9E4F718A144E4006EEC0D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
CDD9E4F918A144E4006EEC0D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
@ -564,72 +520,10 @@
path = Crypto;
sourceTree = "<group>";
};
CD490A2F18A1639600CFECE0 /* TSAlertView */ = {
isa = PBXGroup;
children = (
CD490A3018A1639600CFECE0 /* Demo */,
CD490A3F18A1639600CFECE0 /* README.mdown */,
CD490A4018A1639600CFECE0 /* Source Code License.rtf */,
CD490A4118A1639600CFECE0 /* TSAlertView */,
);
name = TSAlertView;
path = Trovebox/TSAlertView;
sourceTree = "<group>";
};
CD490A3018A1639600CFECE0 /* Demo */ = {
isa = PBXGroup;
children = (
CD490A3118A1639600CFECE0 /* Classes */,
CD490A3718A1639600CFECE0 /* main.m */,
CD490A3818A1639600CFECE0 /* MainWindow-iPad.xib */,
CD490A3918A1639600CFECE0 /* MainWindow.xib */,
CD490A3A18A1639600CFECE0 /* TSAVDemo-Info.plist */,
CD490A3B18A1639600CFECE0 /* TSAVDemo.xcodeproj */,
CD490A3E18A1639600CFECE0 /* TSAVDemo_Prefix.pch */,
);
path = Demo;
sourceTree = "<group>";
};
CD490A3118A1639600CFECE0 /* Classes */ = {
isa = PBXGroup;
children = (
CD490A3218A1639600CFECE0 /* TSAVDemoAppDelegate.h */,
CD490A3318A1639600CFECE0 /* TSAVDemoAppDelegate.m */,
CD490A3418A1639600CFECE0 /* TSAVDemoViewController.h */,
CD490A3518A1639600CFECE0 /* TSAVDemoViewController.m */,
CD490A3618A1639600CFECE0 /* TSAVDemoViewController.xib */,
);
path = Classes;
sourceTree = "<group>";
};
CD490A3C18A1639600CFECE0 /* Products */ = {
isa = PBXGroup;
children = (
CD490A5C18A1639600CFECE0 /* TSAVDemo.app */,
);
name = Products;
sourceTree = "<group>";
};
CD490A4118A1639600CFECE0 /* TSAlertView */ = {
isa = PBXGroup;
children = (
CD490A4218A1639600CFECE0 /* TSAlertView.h */,
CD490A4318A1639600CFECE0 /* TSAlertView.m */,
CD490A4418A1639600CFECE0 /* TSAlertViewBackground.png */,
CD490A4518A1639600CFECE0 /* TSAlertViewBackground2.png */,
CD490A4618A1639600CFECE0 /* TSAlertViewButtonBackground.png */,
CD490A4718A1639600CFECE0 /* TSAlertViewButtonBackground_Highlighted.png */,
CD490A4818A1639600CFECE0 /* TSAlertViewCancelButtonBackground.png */,
CD490A4918A1639600CFECE0 /* TSAlertViewMessageListViewShadow.png */,
);
path = TSAlertView;
sourceTree = "<group>";
};
CD490A5D18A1639A00CFECE0 /* Others Codes */ = {
isa = PBXGroup;
children = (
CD4909F818A1628700CFECE0 /* OAuth */,
CD490A2F18A1639600CFECE0 /* TSAlertView */,
);
name = "Others Codes";
sourceTree = "<group>";
@ -1060,12 +954,6 @@
mainGroup = CDD9E4EB18A144E4006EEC0D;
productRefGroup = CDD9E4F518A144E4006EEC0D /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = CD490A3C18A1639600CFECE0 /* Products */;
ProjectRef = CD490A3B18A1639600CFECE0 /* TSAVDemo.xcodeproj */;
},
);
projectRoot = "";
targets = (
CDD9E4F318A144E4006EEC0D /* Trovebox */,
@ -1074,58 +962,36 @@
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
CD490A5C18A1639600CFECE0 /* TSAVDemo.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = TSAVDemo.app;
remoteRef = CD490A5B18A1639600CFECE0 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
CDD9E4F218A144E4006EEC0D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CD490A5818A1639600CFECE0 /* TSAlertViewCancelButtonBackground.png in Resources */,
CDD9E5C018A14707006EEC0D /* ProfileViewController.xib in Resources */,
CDD9E58318A1469E006EEC0D /* AuthenticationViewController5.xib in Resources */,
CDD9E5B118A146EB006EEC0D /* NewestPhotoCelliPad.xib in Resources */,
CDD9E5B418A146EB006EEC0D /* UploadCelliPad.xib in Resources */,
CDD9E66618A147F2006EEC0D /* Localizable.strings in Resources */,
CDD9E58218A1469E006EEC0D /* AuthenticationViewController.xib in Resources */,
CD490A5918A1639600CFECE0 /* TSAlertViewMessageListViewShadow.png in Resources */,
CD490A5718A1639600CFECE0 /* TSAlertViewButtonBackground_Highlighted.png in Resources */,
CDD9E59B18A146CC006EEC0D /* MenuTableViewSectionCell.xib in Resources */,
CDD9E5B318A146EB006EEC0D /* UploadCell.xib in Resources */,
CD490A5418A1639600CFECE0 /* TSAlertViewBackground.png in Resources */,
CDD9E59D18A146CC006EEC0D /* MenuTableViewSearchCell.xib in Resources */,
CDD9E5C118A14707006EEC0D /* ProfileViewControlleriPad.xib in Resources */,
CD490A4E18A1639600CFECE0 /* MainWindow-iPad.xib in Resources */,
CD490A5618A1639600CFECE0 /* TSAlertViewButtonBackground.png in Resources */,
CDD9E60118A14754006EEC0D /* MWPhotoBrowser.bundle in Resources */,
CDD9E5CF18A1472A006EEC0D /* PhotoViewController.xib in Resources */,
CD490A5118A1639600CFECE0 /* README.mdown in Resources */,
CDD9E50418A144E4006EEC0D /* InfoPlist.strings in Resources */,
CDD9E58618A1469E006EEC0D /* MultiSiteSelectionCell.xib in Resources */,
CDD9E5B018A146EB006EEC0D /* NewestPhotoCell.xib in Resources */,
CDD9E5C218A14707006EEC0D /* Settings.bundle in Resources */,
CD490A5518A1639600CFECE0 /* TSAlertViewBackground2.png in Resources */,
CD490A5218A1639600CFECE0 /* Source Code License.rtf in Resources */,
CDD9E5E718A1473B006EEC0D /* ELCImagePickerController.xib in Resources */,
CDD9E5EA18A1473B006EEC0D /* SyncViewController.xib in Resources */,
CDD9E57F18A1469E006EEC0D /* LoginConnectViewController.xib in Resources */,
CDD9E50F18A144E4006EEC0D /* Images.xcassets in Resources */,
CDD9E57C18A1469E006EEC0D /* LoginViewController5.xib in Resources */,
CD490A4C18A1639600CFECE0 /* TSAVDemoViewController.xib in Resources */,
CDD9E57D18A1469E006EEC0D /* LoginViewControlleriPad.xib in Resources */,
CDD9E59918A146CC006EEC0D /* MenuTableViewCell.xib in Resources */,
CDD9E5E518A1473B006EEC0D /* ELCAssetPicker.xib in Resources */,
CD490A4F18A1639600CFECE0 /* MainWindow.xib in Resources */,
CDD9E5D018A1472A006EEC0D /* PhotoViewController5.xib in Resources */,
CD490A5018A1639600CFECE0 /* TSAVDemo-Info.plist in Resources */,
CDD9E57B18A1469E006EEC0D /* LoginViewController.xib in Resources */,
CDD9E58018A1469E006EEC0D /* LoginConnectViewController5.xib in Resources */,
);
@ -1205,7 +1071,6 @@
CDD9E58118A1469E006EEC0D /* AuthenticationViewController.m in Sources */,
CD490A2618A1628700CFECE0 /* OAPlaintextSignatureProvider.m in Sources */,
CDD9E59F18A146CC006EEC0D /* UINavigationItem+Trovebox.m in Sources */,
CD490A4D18A1639600CFECE0 /* main.m in Sources */,
CDD9E60818A14754006EEC0D /* GalleryViewController.m in Sources */,
CD490A2018A1628700CFECE0 /* sha1.c in Sources */,
CDD9E59818A146CC006EEC0D /* MenuTableViewCell.m in Sources */,
@ -1213,7 +1078,6 @@
CDD9E66018A147A7006EEC0D /* PhotoSHKConfigurator.m in Sources */,
CD490A1D18A1628700CFECE0 /* NSURL+Base.m in Sources */,
CDD9E65518A147A7006EEC0D /* DateUtilities.m in Sources */,
CD490A4B18A1639600CFECE0 /* TSAVDemoViewController.m in Sources */,
CDD9E59E18A146CC006EEC0D /* UINavigationBar+Trovebox.m in Sources */,
CD490A1E18A1628700CFECE0 /* Base64Transcoder.c in Sources */,
CDD9E60718A14754006EEC0D /* MWZoomingScrollView.m in Sources */,
@ -1239,9 +1103,7 @@
CDD9E57A18A1469E006EEC0D /* LoginViewController.m in Sources */,
CDD9E65618A147A7006EEC0D /* ImageManipulation.m in Sources */,
CDD9E59C18A146CC006EEC0D /* MenuTableViewSearchCell.m in Sources */,
CD490A4A18A1639600CFECE0 /* TSAVDemoAppDelegate.m in Sources */,
CDD9E65318A147A7006EEC0D /* UpdateUtilities.m in Sources */,
CD490A5318A1639600CFECE0 /* TSAlertView.m in Sources */,
CDD9E58518A1469E006EEC0D /* MultiSiteSelectionCell.m in Sources */,
CDD9E56518A1467F006EEC0D /* Synced.m in Sources */,
CDD9E50A18A144E4006EEC0D /* AppDelegate.m in Sources */,

View file

@ -1,3 +1,4 @@
//
// Account
// Trovebox

View file

@ -18,7 +18,6 @@
// limitations under the License.
//
#import "TSAlertView.h"
#import "WebService.h"
#import "MBProgressHUD.h"
#import "PhotoAlertView.h"
@ -27,7 +26,7 @@
// image cache
#import <SDWebImage/UIImageView+WebCache.h>
@interface AlbumViewController : UITableViewController<TSAlertViewDelegate, UINavigationControllerDelegate>
@interface AlbumViewController : UITableViewController<UIAlertViewDelegate, UINavigationControllerDelegate>
@property (nonatomic, strong) NSMutableArray *albums;

View file

@ -334,22 +334,25 @@
NSLog(@"Adding new album");
#endif
TSAlertView* av = [[TSAlertView alloc] initWithTitle:NSLocalizedString(@"Enter new album name",@"Album screen - create a new album") message:nil delegate:self
UIAlertView* av = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Enter new album name",@"Album screen - create a new album") message:nil delegate:self
cancelButtonTitle:NSLocalizedString(@"Cancel",nil)
otherButtonTitles:NSLocalizedString(@"OK",nil),nil];
av.style = TSAlertViewStyleInput;
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
[av show];
}
// after animation
- (void) alertView: (TSAlertView *) alertView didDismissWithButtonIndex: (NSInteger) buttonIndex
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
UITextField *textField = [alertView textFieldAtIndex:0];
// cancel
if( buttonIndex == 0 || alertView.inputTextField.text == nil || alertView.inputTextField.text.length==0)
if( buttonIndex == 0 || textField.text == nil || textField.text.length==0)
return;
// add the new tag in the list and select it
Album *album = [[Album alloc] initWithAlbumName:alertView.inputTextField.text];
Album *album = [[Album alloc] initWithAlbumName:textField.text];
MBProgressHUD *hud =[MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.labelText = NSLocalizedString(@"Creating",@"Creating Album");

View file

@ -0,0 +1,3 @@
DLCImagePickerController.xcodeproj/xcuserdata
DLCImagePickerController.xcodeproj/project.xcworkspace
.DS_Store

View file

@ -0,0 +1,3 @@
[submodule "GPUImage"]
path = GPUImage
url = git://github.com/BradLarson/GPUImage.git

View file

@ -0,0 +1,732 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
6A0D0A01165A1CBE0028E1B6 /* BlurOverlayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A0D0A00165A1CBE0028E1B6 /* BlurOverlayView.m */; };
6A0D0A0F165A1FFC0028E1B6 /* focus-crosshair.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A0D0A0D165A1FFC0028E1B6 /* focus-crosshair.png */; };
6A0D0A10165A1FFC0028E1B6 /* focus-crosshair@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A0D0A0E165A1FFC0028E1B6 /* focus-crosshair@2x.png */; };
6A0D0A28165A218F0028E1B6 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A0D0A27165A218F0028E1B6 /* Default-568h@2x.png */; };
6A23390E15E6C17000CC6CB2 /* library@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A23390C15E6C17000CC6CB2 /* library@2x.png */; };
6A23390F15E6C17000CC6CB2 /* library.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A23390D15E6C17000CC6CB2 /* library.png */; };
6A42CF7615E46F0E0062D3E7 /* blur-on.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A42CF7415E46F0E0062D3E7 /* blur-on.png */; };
6A42CF7715E46F0E0062D3E7 /* blur-on@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A42CF7515E46F0E0062D3E7 /* blur-on@2x.png */; };
6A49CEA715E345070098304F /* blackframe.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CEA615E345070098304F /* blackframe.png */; };
6A49CED815E459B00098304F /* filter-close.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CED415E459B00098304F /* filter-close.png */; };
6A49CED915E459B00098304F /* filter-close@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CED515E459B00098304F /* filter-close@2x.png */; };
6A49CEDA15E459B00098304F /* filter-open.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CED615E459B00098304F /* filter-open.png */; };
6A49CEDB15E459B00098304F /* filter-open@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CED715E459B00098304F /* filter-open@2x.png */; };
6A49CEEC15E45A5F0098304F /* camera-button.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CEE815E45A5F0098304F /* camera-button.png */; };
6A49CEED15E45A5F0098304F /* camera-button@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CEE915E45A5F0098304F /* camera-button@2x.png */; };
6A49CEEE15E45A5F0098304F /* camera-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CEEA15E45A5F0098304F /* camera-icon.png */; };
6A49CEEF15E45A5F0098304F /* camera-icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CEEB15E45A5F0098304F /* camera-icon@2x.png */; };
6A49CEF215E460540098304F /* filter.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CEF015E460540098304F /* filter.png */; };
6A49CEF315E460540098304F /* filter@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CEF115E460540098304F /* filter@2x.png */; };
6A49CEFA15E461670098304F /* flash-auto.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CEF415E461670098304F /* flash-auto.png */; };
6A49CEFB15E461670098304F /* flash-auto@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CEF515E461670098304F /* flash-auto@2x.png */; };
6A49CEFC15E461670098304F /* flash-off.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CEF615E461670098304F /* flash-off.png */; };
6A49CEFD15E461670098304F /* flash-off@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CEF715E461670098304F /* flash-off@2x.png */; };
6A49CEFE15E461670098304F /* flash.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CEF815E461670098304F /* flash.png */; };
6A49CEFF15E461670098304F /* flash@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CEF915E461670098304F /* flash@2x.png */; };
6A49CF0215E4617A0098304F /* front-camera.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CF0015E4617A0098304F /* front-camera.png */; };
6A49CF0315E4617A0098304F /* front-camera@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CF0115E4617A0098304F /* front-camera@2x.png */; };
6A49CF0615E461B30098304F /* blur.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CF0415E461B30098304F /* blur.png */; };
6A49CF0715E461B30098304F /* blur@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CF0515E461B30098304F /* blur@2x.png */; };
6A49CF0A15E461D10098304F /* close.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CF0815E461D10098304F /* close.png */; };
6A49CF0B15E461D10098304F /* close@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A49CF0915E461D10098304F /* close@2x.png */; };
6A55309515E4869600019CC9 /* 1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A55309315E4869600019CC9 /* 1.jpg */; };
6A55309615E4869600019CC9 /* 1@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A55309415E4869600019CC9 /* 1@2x.jpg */; };
6A55309915E486A600019CC9 /* 2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A55309715E486A600019CC9 /* 2.jpg */; };
6A55309A15E486A600019CC9 /* 2@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A55309815E486A600019CC9 /* 2@2x.jpg */; };
6A55309D15E486B300019CC9 /* 3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A55309B15E486B300019CC9 /* 3.jpg */; };
6A55309E15E486B300019CC9 /* 3@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A55309C15E486B300019CC9 /* 3@2x.jpg */; };
6A5530A115E486BB00019CC9 /* 4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A55309F15E486BB00019CC9 /* 4.jpg */; };
6A5530A215E486BB00019CC9 /* 4@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A5530A015E486BB00019CC9 /* 4@2x.jpg */; };
6A5530A515E486C300019CC9 /* 5.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A5530A315E486C300019CC9 /* 5.jpg */; };
6A5530A615E486C300019CC9 /* 5@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A5530A415E486C300019CC9 /* 5@2x.jpg */; };
6A5530A915E486CB00019CC9 /* 6.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A5530A715E486CB00019CC9 /* 6.jpg */; };
6A5530AA15E486CB00019CC9 /* 6@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A5530A815E486CB00019CC9 /* 6@2x.jpg */; };
6A5530AD15E486D500019CC9 /* 7.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A5530AB15E486D500019CC9 /* 7.jpg */; };
6A5530AE15E486D500019CC9 /* 7@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A5530AC15E486D500019CC9 /* 7@2x.jpg */; };
6A5530B115E486DD00019CC9 /* 8.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A5530AF15E486DD00019CC9 /* 8.jpg */; };
6A5530B215E486DD00019CC9 /* 8@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A5530B015E486DD00019CC9 /* 8@2x.jpg */; };
6A5530B515E486E300019CC9 /* 9.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A5530B315E486E300019CC9 /* 9.jpg */; };
6A5530B615E486E300019CC9 /* 9@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A5530B415E486E300019CC9 /* 9@2x.jpg */; };
6A5530B915E486E900019CC9 /* 10.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A5530B715E486E900019CC9 /* 10.jpg */; };
6A5530BA15E486E900019CC9 /* 10@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6A5530B815E486E900019CC9 /* 10@2x.jpg */; };
6A5BBDA815E2214B00B1B485 /* 02.acv in Resources */ = {isa = PBXBuildFile; fileRef = 6A5BBDA515E2214B00B1B485 /* 02.acv */; };
6A5BBDA915E2214B00B1B485 /* 06.acv in Resources */ = {isa = PBXBuildFile; fileRef = 6A5BBDA615E2214B00B1B485 /* 06.acv */; };
6A5BBDAA15E2214B00B1B485 /* 17.acv in Resources */ = {isa = PBXBuildFile; fileRef = 6A5BBDA715E2214B00B1B485 /* 17.acv */; };
6A5D9A1515E0152D001FAD14 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5D9A1415E0152D001FAD14 /* UIKit.framework */; };
6A5D9A1715E0152D001FAD14 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5D9A1615E0152D001FAD14 /* Foundation.framework */; };
6A5D9A1915E0152D001FAD14 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5D9A1815E0152D001FAD14 /* CoreGraphics.framework */; };
6A5D9A1F15E0152D001FAD14 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A1D15E0152D001FAD14 /* InfoPlist.strings */; };
6A5D9A2115E0152D001FAD14 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A5D9A2015E0152D001FAD14 /* main.m */; };
6A5D9A2515E0152E001FAD14 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A5D9A2415E0152D001FAD14 /* AppDelegate.m */; };
6A5D9A2C15E01587001FAD14 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5D9A2B15E01587001FAD14 /* CoreMedia.framework */; };
6A5D9A2E15E01590001FAD14 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5D9A2D15E01590001FAD14 /* CoreVideo.framework */; };
6A5D9A3015E01598001FAD14 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5D9A2F15E01598001FAD14 /* QuartzCore.framework */; };
6A5D9A3215E015A1001FAD14 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5D9A3115E015A1001FAD14 /* OpenGLES.framework */; };
6A5D9A3415E015B3001FAD14 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5D9A3315E015B3001FAD14 /* AVFoundation.framework */; };
6A5D9A5715E01BD7001FAD14 /* libGPUImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5D9A5215E01B72001FAD14 /* libGPUImage.a */; };
6A5D9A5915E01DA4001FAD14 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5D9A5815E01DA4001FAD14 /* AssetsLibrary.framework */; };
6A5D9A8815E02429001FAD14 /* DLCImagePickerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A5D9A8715E02429001FAD14 /* DLCImagePickerController.m */; };
6A5D9A8B15E02504001FAD14 /* PhotoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A5D9A8A15E02504001FAD14 /* PhotoViewController.m */; };
6A5D9AA115E02527001FAD14 /* mask.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A9415E02527001FAD14 /* mask.png */; };
6A5D9AA215E02527001FAD14 /* dock_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A9615E02527001FAD14 /* dock_bg.png */; };
6A5D9AA315E02527001FAD14 /* dock_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A9715E02527001FAD14 /* dock_bg@2x.png */; };
6A5D9AA415E02527001FAD14 /* micro_carbon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A9815E02527001FAD14 /* micro_carbon.png */; };
6A5D9AA515E02527001FAD14 /* micro_carbon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A9915E02527001FAD14 /* micro_carbon@2x.png */; };
6A5D9AA615E02527001FAD14 /* photo_bar.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A9A15E02527001FAD14 /* photo_bar.png */; };
6A5D9AA715E02527001FAD14 /* photo_bar@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A9B15E02527001FAD14 /* photo_bar@2x.png */; };
6A5D9AAA15E0259A001FAD14 /* DLCImagePicker.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9AA915E0259A001FAD14 /* DLCImagePicker.xib */; };
7D0E5AB315E203FA009D19C9 /* purple-green.acv in Resources */ = {isa = PBXBuildFile; fileRef = 7D0E5AB115E203FA009D19C9 /* purple-green.acv */; };
7D0E5AB415E203FA009D19C9 /* yellow-red.acv in Resources */ = {isa = PBXBuildFile; fileRef = 7D0E5AB215E203FA009D19C9 /* yellow-red.acv */; };
7D0E5AB815E209AD009D19C9 /* GrayscaleContrastFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0E5AB715E209AD009D19C9 /* GrayscaleContrastFilter.m */; };
7D1E64B915E1FA2F005A9E09 /* crossprocess.acv in Resources */ = {isa = PBXBuildFile; fileRef = 7D1E64B715E1FA2F005A9E09 /* crossprocess.acv */; };
7DEB4DC615E063420078BFAD /* sample1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 7DEB4DC515E063420078BFAD /* sample1.jpg */; };
7DFAE1BA15E22A9F00C8236F /* aqua.acv in Resources */ = {isa = PBXBuildFile; fileRef = 7DFAE1B915E22A9F00C8236F /* aqua.acv */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
6A5D9A5115E01B72001FAD14 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6A5D9A4815E01B72001FAD14 /* GPUImage.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BCF1A33414DDB1EC00852800;
remoteInfo = GPUImage;
};
6A5D9A5315E01B72001FAD14 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6A5D9A4815E01B72001FAD14 /* GPUImage.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BCF1A34414DDB1EC00852800;
remoteInfo = GPUImageTests;
};
6A5D9A5515E01BC2001FAD14 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6A5D9A4815E01B72001FAD14 /* GPUImage.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = BCF1A33314DDB1EC00852800;
remoteInfo = GPUImage;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
6A0D09FF165A1CBE0028E1B6 /* BlurOverlayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlurOverlayView.h; sourceTree = "<group>"; };
6A0D0A00165A1CBE0028E1B6 /* BlurOverlayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BlurOverlayView.m; sourceTree = "<group>"; };
6A0D0A0D165A1FFC0028E1B6 /* focus-crosshair.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "focus-crosshair.png"; sourceTree = "<group>"; };
6A0D0A0E165A1FFC0028E1B6 /* focus-crosshair@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "focus-crosshair@2x.png"; sourceTree = "<group>"; };
6A0D0A27165A218F0028E1B6 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "../Default-568h@2x.png"; sourceTree = "<group>"; };
6A23390C15E6C17000CC6CB2 /* library@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "library@2x.png"; sourceTree = "<group>"; };
6A23390D15E6C17000CC6CB2 /* library.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = library.png; sourceTree = "<group>"; };
6A42CF7415E46F0E0062D3E7 /* blur-on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "blur-on.png"; sourceTree = "<group>"; };
6A42CF7515E46F0E0062D3E7 /* blur-on@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "blur-on@2x.png"; sourceTree = "<group>"; };
6A49CEA615E345070098304F /* blackframe.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = blackframe.png; sourceTree = "<group>"; };
6A49CED415E459B00098304F /* filter-close.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "filter-close.png"; sourceTree = "<group>"; };
6A49CED515E459B00098304F /* filter-close@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "filter-close@2x.png"; sourceTree = "<group>"; };
6A49CED615E459B00098304F /* filter-open.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "filter-open.png"; sourceTree = "<group>"; };
6A49CED715E459B00098304F /* filter-open@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "filter-open@2x.png"; sourceTree = "<group>"; };
6A49CEE815E45A5F0098304F /* camera-button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "camera-button.png"; sourceTree = "<group>"; };
6A49CEE915E45A5F0098304F /* camera-button@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "camera-button@2x.png"; sourceTree = "<group>"; };
6A49CEEA15E45A5F0098304F /* camera-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "camera-icon.png"; sourceTree = "<group>"; };
6A49CEEB15E45A5F0098304F /* camera-icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "camera-icon@2x.png"; sourceTree = "<group>"; };
6A49CEF015E460540098304F /* filter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = filter.png; sourceTree = "<group>"; };
6A49CEF115E460540098304F /* filter@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "filter@2x.png"; sourceTree = "<group>"; };
6A49CEF415E461670098304F /* flash-auto.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "flash-auto.png"; sourceTree = "<group>"; };
6A49CEF515E461670098304F /* flash-auto@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "flash-auto@2x.png"; sourceTree = "<group>"; };
6A49CEF615E461670098304F /* flash-off.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "flash-off.png"; sourceTree = "<group>"; };
6A49CEF715E461670098304F /* flash-off@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "flash-off@2x.png"; sourceTree = "<group>"; };
6A49CEF815E461670098304F /* flash.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flash.png; sourceTree = "<group>"; };
6A49CEF915E461670098304F /* flash@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "flash@2x.png"; sourceTree = "<group>"; };
6A49CF0015E4617A0098304F /* front-camera.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "front-camera.png"; sourceTree = "<group>"; };
6A49CF0115E4617A0098304F /* front-camera@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "front-camera@2x.png"; sourceTree = "<group>"; };
6A49CF0415E461B30098304F /* blur.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = blur.png; sourceTree = "<group>"; };
6A49CF0515E461B30098304F /* blur@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "blur@2x.png"; sourceTree = "<group>"; };
6A49CF0815E461D10098304F /* close.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = close.png; sourceTree = "<group>"; };
6A49CF0915E461D10098304F /* close@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "close@2x.png"; sourceTree = "<group>"; };
6A55309315E4869600019CC9 /* 1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1.jpg; sourceTree = "<group>"; };
6A55309415E4869600019CC9 /* 1@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "1@2x.jpg"; sourceTree = "<group>"; };
6A55309715E486A600019CC9 /* 2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 2.jpg; sourceTree = "<group>"; };
6A55309815E486A600019CC9 /* 2@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "2@2x.jpg"; sourceTree = "<group>"; };
6A55309B15E486B300019CC9 /* 3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 3.jpg; sourceTree = "<group>"; };
6A55309C15E486B300019CC9 /* 3@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "3@2x.jpg"; sourceTree = "<group>"; };
6A55309F15E486BB00019CC9 /* 4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 4.jpg; sourceTree = "<group>"; };
6A5530A015E486BB00019CC9 /* 4@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "4@2x.jpg"; sourceTree = "<group>"; };
6A5530A315E486C300019CC9 /* 5.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 5.jpg; sourceTree = "<group>"; };
6A5530A415E486C300019CC9 /* 5@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "5@2x.jpg"; sourceTree = "<group>"; };
6A5530A715E486CB00019CC9 /* 6.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 6.jpg; sourceTree = "<group>"; };
6A5530A815E486CB00019CC9 /* 6@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "6@2x.jpg"; sourceTree = "<group>"; };
6A5530AB15E486D500019CC9 /* 7.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 7.jpg; sourceTree = "<group>"; };
6A5530AC15E486D500019CC9 /* 7@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "7@2x.jpg"; sourceTree = "<group>"; };
6A5530AF15E486DD00019CC9 /* 8.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 8.jpg; sourceTree = "<group>"; };
6A5530B015E486DD00019CC9 /* 8@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "8@2x.jpg"; sourceTree = "<group>"; };
6A5530B315E486E300019CC9 /* 9.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 9.jpg; sourceTree = "<group>"; };
6A5530B415E486E300019CC9 /* 9@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "9@2x.jpg"; sourceTree = "<group>"; };
6A5530B715E486E900019CC9 /* 10.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 10.jpg; sourceTree = "<group>"; };
6A5530B815E486E900019CC9 /* 10@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "10@2x.jpg"; sourceTree = "<group>"; };
6A5BBDA515E2214B00B1B485 /* 02.acv */ = {isa = PBXFileReference; lastKnownFileType = file; name = 02.acv; path = Filters/02.acv; sourceTree = "<group>"; };
6A5BBDA615E2214B00B1B485 /* 06.acv */ = {isa = PBXFileReference; lastKnownFileType = file; name = 06.acv; path = Filters/06.acv; sourceTree = "<group>"; };
6A5BBDA715E2214B00B1B485 /* 17.acv */ = {isa = PBXFileReference; lastKnownFileType = file; name = 17.acv; path = Filters/17.acv; sourceTree = "<group>"; };
6A5D9A1015E0152D001FAD14 /* DLCImagePickerController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DLCImagePickerController.app; sourceTree = BUILT_PRODUCTS_DIR; };
6A5D9A1415E0152D001FAD14 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
6A5D9A1615E0152D001FAD14 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
6A5D9A1815E0152D001FAD14 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
6A5D9A1C15E0152D001FAD14 /* DLCImagePickerController-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "DLCImagePickerController-Info.plist"; sourceTree = "<group>"; };
6A5D9A1E15E0152D001FAD14 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6A5D9A2015E0152D001FAD14 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
6A5D9A2215E0152D001FAD14 /* DLCImagePickerController-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DLCImagePickerController-Prefix.pch"; sourceTree = "<group>"; };
6A5D9A2315E0152D001FAD14 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
6A5D9A2415E0152D001FAD14 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
6A5D9A2B15E01587001FAD14 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
6A5D9A2D15E01590001FAD14 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
6A5D9A2F15E01598001FAD14 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
6A5D9A3115E015A1001FAD14 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
6A5D9A3315E015B3001FAD14 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
6A5D9A4815E01B72001FAD14 /* GPUImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GPUImage.xcodeproj; path = GPUImage/framework/GPUImage.xcodeproj; sourceTree = "<group>"; };
6A5D9A5815E01DA4001FAD14 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
6A5D9A8615E02429001FAD14 /* DLCImagePickerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DLCImagePickerController.h; sourceTree = "<group>"; };
6A5D9A8715E02429001FAD14 /* DLCImagePickerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DLCImagePickerController.m; sourceTree = "<group>"; };
6A5D9A8915E02504001FAD14 /* PhotoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhotoViewController.h; sourceTree = "<group>"; };
6A5D9A8A15E02504001FAD14 /* PhotoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhotoViewController.m; sourceTree = "<group>"; };
6A5D9A9415E02527001FAD14 /* mask.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mask.png; sourceTree = "<group>"; };
6A5D9A9615E02527001FAD14 /* dock_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dock_bg.png; sourceTree = "<group>"; };
6A5D9A9715E02527001FAD14 /* dock_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "dock_bg@2x.png"; sourceTree = "<group>"; };
6A5D9A9815E02527001FAD14 /* micro_carbon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = micro_carbon.png; sourceTree = "<group>"; };
6A5D9A9915E02527001FAD14 /* micro_carbon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "micro_carbon@2x.png"; sourceTree = "<group>"; };
6A5D9A9A15E02527001FAD14 /* photo_bar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = photo_bar.png; sourceTree = "<group>"; };
6A5D9A9B15E02527001FAD14 /* photo_bar@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "photo_bar@2x.png"; sourceTree = "<group>"; };
6A5D9AA915E0259A001FAD14 /* DLCImagePicker.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DLCImagePicker.xib; sourceTree = "<group>"; };
7D0E5AB115E203FA009D19C9 /* purple-green.acv */ = {isa = PBXFileReference; lastKnownFileType = file; name = "purple-green.acv"; path = "Filters/purple-green.acv"; sourceTree = "<group>"; };
7D0E5AB215E203FA009D19C9 /* yellow-red.acv */ = {isa = PBXFileReference; lastKnownFileType = file; name = "yellow-red.acv"; path = "Filters/yellow-red.acv"; sourceTree = "<group>"; };
7D0E5AB615E2099C009D19C9 /* GrayscaleContrastFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GrayscaleContrastFilter.h; sourceTree = "<group>"; };
7D0E5AB715E209AD009D19C9 /* GrayscaleContrastFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GrayscaleContrastFilter.m; sourceTree = "<group>"; };
7D1E64B715E1FA2F005A9E09 /* crossprocess.acv */ = {isa = PBXFileReference; lastKnownFileType = file; name = crossprocess.acv; path = Filters/crossprocess.acv; sourceTree = "<group>"; };
7DEB4DC515E063420078BFAD /* sample1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = sample1.jpg; path = Samples/sample1.jpg; sourceTree = "<group>"; };
7DFAE1B915E22A9F00C8236F /* aqua.acv */ = {isa = PBXFileReference; lastKnownFileType = file; name = aqua.acv; path = Filters/aqua.acv; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
6A5D9A0D15E0152D001FAD14 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
6A5D9A5915E01DA4001FAD14 /* AssetsLibrary.framework in Frameworks */,
6A5D9A5715E01BD7001FAD14 /* libGPUImage.a in Frameworks */,
6A5D9A3415E015B3001FAD14 /* AVFoundation.framework in Frameworks */,
6A5D9A3215E015A1001FAD14 /* OpenGLES.framework in Frameworks */,
6A5D9A3015E01598001FAD14 /* QuartzCore.framework in Frameworks */,
6A5D9A2E15E01590001FAD14 /* CoreVideo.framework in Frameworks */,
6A5D9A2C15E01587001FAD14 /* CoreMedia.framework in Frameworks */,
6A5D9A1515E0152D001FAD14 /* UIKit.framework in Frameworks */,
6A5D9A1715E0152D001FAD14 /* Foundation.framework in Frameworks */,
6A5D9A1915E0152D001FAD14 /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
6A55309215E4868000019CC9 /* FilterSamples */ = {
isa = PBXGroup;
children = (
6A5530B715E486E900019CC9 /* 10.jpg */,
6A5530B815E486E900019CC9 /* 10@2x.jpg */,
6A5530B315E486E300019CC9 /* 9.jpg */,
6A5530B415E486E300019CC9 /* 9@2x.jpg */,
6A5530AF15E486DD00019CC9 /* 8.jpg */,
6A5530B015E486DD00019CC9 /* 8@2x.jpg */,
6A5530AB15E486D500019CC9 /* 7.jpg */,
6A5530AC15E486D500019CC9 /* 7@2x.jpg */,
6A5530A715E486CB00019CC9 /* 6.jpg */,
6A5530A815E486CB00019CC9 /* 6@2x.jpg */,
6A5530A315E486C300019CC9 /* 5.jpg */,
6A5530A415E486C300019CC9 /* 5@2x.jpg */,
6A55309F15E486BB00019CC9 /* 4.jpg */,
6A5530A015E486BB00019CC9 /* 4@2x.jpg */,
6A55309B15E486B300019CC9 /* 3.jpg */,
6A55309C15E486B300019CC9 /* 3@2x.jpg */,
6A55309715E486A600019CC9 /* 2.jpg */,
6A55309815E486A600019CC9 /* 2@2x.jpg */,
6A55309315E4869600019CC9 /* 1.jpg */,
6A55309415E4869600019CC9 /* 1@2x.jpg */,
);
path = FilterSamples;
sourceTree = "<group>";
};
6A5D9A0515E0152D001FAD14 = {
isa = PBXGroup;
children = (
6A5D9A8515E02429001FAD14 /* Classes */,
6A5D9AA815E0259A001FAD14 /* Resources */,
6A5D9A8C15E02527001FAD14 /* Images */,
6A5D9A1A15E0152D001FAD14 /* DLCImagePickerController */,
6A5D9A1315E0152D001FAD14 /* Frameworks */,
6A5D9A1115E0152D001FAD14 /* Products */,
);
sourceTree = "<group>";
};
6A5D9A1115E0152D001FAD14 /* Products */ = {
isa = PBXGroup;
children = (
6A5D9A1015E0152D001FAD14 /* DLCImagePickerController.app */,
);
name = Products;
sourceTree = "<group>";
};
6A5D9A1315E0152D001FAD14 /* Frameworks */ = {
isa = PBXGroup;
children = (
6A5D9A5815E01DA4001FAD14 /* AssetsLibrary.framework */,
6A5D9A4815E01B72001FAD14 /* GPUImage.xcodeproj */,
6A5D9A3315E015B3001FAD14 /* AVFoundation.framework */,
6A5D9A3115E015A1001FAD14 /* OpenGLES.framework */,
6A5D9A2F15E01598001FAD14 /* QuartzCore.framework */,
6A5D9A2D15E01590001FAD14 /* CoreVideo.framework */,
6A5D9A2B15E01587001FAD14 /* CoreMedia.framework */,
6A5D9A1415E0152D001FAD14 /* UIKit.framework */,
6A5D9A1615E0152D001FAD14 /* Foundation.framework */,
6A5D9A1815E0152D001FAD14 /* CoreGraphics.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
6A5D9A1A15E0152D001FAD14 /* DLCImagePickerController */ = {
isa = PBXGroup;
children = (
6A0D0A27165A218F0028E1B6 /* Default-568h@2x.png */,
6A5D9A2315E0152D001FAD14 /* AppDelegate.h */,
6A5D9A2415E0152D001FAD14 /* AppDelegate.m */,
6A5D9A1B15E0152D001FAD14 /* Supporting Files */,
);
path = DLCImagePickerController;
sourceTree = "<group>";
};
6A5D9A1B15E0152D001FAD14 /* Supporting Files */ = {
isa = PBXGroup;
children = (
6A5D9A1C15E0152D001FAD14 /* DLCImagePickerController-Info.plist */,
6A5D9A1D15E0152D001FAD14 /* InfoPlist.strings */,
6A5D9A2015E0152D001FAD14 /* main.m */,
6A5D9A2215E0152D001FAD14 /* DLCImagePickerController-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
6A5D9A4915E01B72001FAD14 /* Products */ = {
isa = PBXGroup;
children = (
6A5D9A5215E01B72001FAD14 /* libGPUImage.a */,
6A5D9A5415E01B72001FAD14 /* GPUImageTests.octest */,
);
name = Products;
sourceTree = "<group>";
};
6A5D9A8515E02429001FAD14 /* Classes */ = {
isa = PBXGroup;
children = (
6A0D09FF165A1CBE0028E1B6 /* BlurOverlayView.h */,
6A0D0A00165A1CBE0028E1B6 /* BlurOverlayView.m */,
7D0E5AB515E20987009D19C9 /* Filters */,
6A5D9A8915E02504001FAD14 /* PhotoViewController.h */,
6A5D9A8A15E02504001FAD14 /* PhotoViewController.m */,
6A5D9A8615E02429001FAD14 /* DLCImagePickerController.h */,
6A5D9A8715E02429001FAD14 /* DLCImagePickerController.m */,
);
path = Classes;
sourceTree = "<group>";
};
6A5D9A8C15E02527001FAD14 /* Images */ = {
isa = PBXGroup;
children = (
6A55309215E4868000019CC9 /* FilterSamples */,
7D643C2E15E05FBF0035A22D /* Samples */,
6A5D9A9215E02527001FAD14 /* Overlays */,
6A5D9A9515E02527001FAD14 /* UI */,
);
path = Images;
sourceTree = "<group>";
};
6A5D9A9215E02527001FAD14 /* Overlays */ = {
isa = PBXGroup;
children = (
6A49CEA615E345070098304F /* blackframe.png */,
6A5D9A9415E02527001FAD14 /* mask.png */,
);
path = Overlays;
sourceTree = "<group>";
};
6A5D9A9515E02527001FAD14 /* UI */ = {
isa = PBXGroup;
children = (
6A0D0A0D165A1FFC0028E1B6 /* focus-crosshair.png */,
6A0D0A0E165A1FFC0028E1B6 /* focus-crosshair@2x.png */,
6A23390C15E6C17000CC6CB2 /* library@2x.png */,
6A23390D15E6C17000CC6CB2 /* library.png */,
6A42CF7415E46F0E0062D3E7 /* blur-on.png */,
6A42CF7515E46F0E0062D3E7 /* blur-on@2x.png */,
6A49CF0815E461D10098304F /* close.png */,
6A49CF0915E461D10098304F /* close@2x.png */,
6A49CF0415E461B30098304F /* blur.png */,
6A49CF0515E461B30098304F /* blur@2x.png */,
6A49CF0015E4617A0098304F /* front-camera.png */,
6A49CF0115E4617A0098304F /* front-camera@2x.png */,
6A49CEF415E461670098304F /* flash-auto.png */,
6A49CEF515E461670098304F /* flash-auto@2x.png */,
6A49CEF615E461670098304F /* flash-off.png */,
6A49CEF715E461670098304F /* flash-off@2x.png */,
6A49CEF815E461670098304F /* flash.png */,
6A49CEF915E461670098304F /* flash@2x.png */,
6A49CEF015E460540098304F /* filter.png */,
6A49CEF115E460540098304F /* filter@2x.png */,
6A49CEE815E45A5F0098304F /* camera-button.png */,
6A49CEE915E45A5F0098304F /* camera-button@2x.png */,
6A49CEEA15E45A5F0098304F /* camera-icon.png */,
6A49CEEB15E45A5F0098304F /* camera-icon@2x.png */,
6A49CED415E459B00098304F /* filter-close.png */,
6A49CED515E459B00098304F /* filter-close@2x.png */,
6A49CED615E459B00098304F /* filter-open.png */,
6A49CED715E459B00098304F /* filter-open@2x.png */,
6A5D9A9615E02527001FAD14 /* dock_bg.png */,
6A5D9A9715E02527001FAD14 /* dock_bg@2x.png */,
6A5D9A9815E02527001FAD14 /* micro_carbon.png */,
6A5D9A9915E02527001FAD14 /* micro_carbon@2x.png */,
6A5D9A9A15E02527001FAD14 /* photo_bar.png */,
6A5D9A9B15E02527001FAD14 /* photo_bar@2x.png */,
);
path = UI;
sourceTree = "<group>";
};
6A5D9AA815E0259A001FAD14 /* Resources */ = {
isa = PBXGroup;
children = (
7D1E64B615E1F8D9005A9E09 /* Curves */,
6A5D9AA915E0259A001FAD14 /* DLCImagePicker.xib */,
);
path = Resources;
sourceTree = "<group>";
};
7D0E5AB515E20987009D19C9 /* Filters */ = {
isa = PBXGroup;
children = (
7D0E5AB615E2099C009D19C9 /* GrayscaleContrastFilter.h */,
7D0E5AB715E209AD009D19C9 /* GrayscaleContrastFilter.m */,
);
name = Filters;
sourceTree = "<group>";
};
7D1E64B615E1F8D9005A9E09 /* Curves */ = {
isa = PBXGroup;
children = (
7DFAE1B915E22A9F00C8236F /* aqua.acv */,
6A5BBDA515E2214B00B1B485 /* 02.acv */,
6A5BBDA615E2214B00B1B485 /* 06.acv */,
6A5BBDA715E2214B00B1B485 /* 17.acv */,
7D0E5AB115E203FA009D19C9 /* purple-green.acv */,
7D0E5AB215E203FA009D19C9 /* yellow-red.acv */,
7D1E64B715E1FA2F005A9E09 /* crossprocess.acv */,
);
name = Curves;
sourceTree = "<group>";
};
7D643C2E15E05FBF0035A22D /* Samples */ = {
isa = PBXGroup;
children = (
7DEB4DC515E063420078BFAD /* sample1.jpg */,
);
name = Samples;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
6A5D9A0F15E0152D001FAD14 /* DLCImagePickerController */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6A5D9A2815E0152E001FAD14 /* Build configuration list for PBXNativeTarget "DLCImagePickerController" */;
buildPhases = (
6A5D9A0C15E0152D001FAD14 /* Sources */,
6A5D9A0D15E0152D001FAD14 /* Frameworks */,
6A5D9A0E15E0152D001FAD14 /* Resources */,
);
buildRules = (
);
dependencies = (
6A5D9A5615E01BC2001FAD14 /* PBXTargetDependency */,
);
name = DLCImagePickerController;
productName = DLCImagePickerController;
productReference = 6A5D9A1015E0152D001FAD14 /* DLCImagePickerController.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
6A5D9A0715E0152D001FAD14 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0460;
ORGANIZATIONNAME = "Backspaces Inc";
};
buildConfigurationList = 6A5D9A0A15E0152D001FAD14 /* Build configuration list for PBXProject "DLCImagePickerController" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 6A5D9A0515E0152D001FAD14;
productRefGroup = 6A5D9A1115E0152D001FAD14 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 6A5D9A4915E01B72001FAD14 /* Products */;
ProjectRef = 6A5D9A4815E01B72001FAD14 /* GPUImage.xcodeproj */;
},
);
projectRoot = "";
targets = (
6A5D9A0F15E0152D001FAD14 /* DLCImagePickerController */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
6A5D9A5215E01B72001FAD14 /* libGPUImage.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libGPUImage.a;
remoteRef = 6A5D9A5115E01B72001FAD14 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
6A5D9A5415E01B72001FAD14 /* GPUImageTests.octest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = GPUImageTests.octest;
remoteRef = 6A5D9A5315E01B72001FAD14 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
6A5D9A0E15E0152D001FAD14 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6A5D9A1F15E0152D001FAD14 /* InfoPlist.strings in Resources */,
6A5D9AA115E02527001FAD14 /* mask.png in Resources */,
6A5D9AA215E02527001FAD14 /* dock_bg.png in Resources */,
6A5D9AA315E02527001FAD14 /* dock_bg@2x.png in Resources */,
6A5D9AA415E02527001FAD14 /* micro_carbon.png in Resources */,
6A5D9AA515E02527001FAD14 /* micro_carbon@2x.png in Resources */,
6A5D9AA615E02527001FAD14 /* photo_bar.png in Resources */,
6A5D9AA715E02527001FAD14 /* photo_bar@2x.png in Resources */,
6A5D9AAA15E0259A001FAD14 /* DLCImagePicker.xib in Resources */,
7DEB4DC615E063420078BFAD /* sample1.jpg in Resources */,
7D1E64B915E1FA2F005A9E09 /* crossprocess.acv in Resources */,
7D0E5AB315E203FA009D19C9 /* purple-green.acv in Resources */,
7D0E5AB415E203FA009D19C9 /* yellow-red.acv in Resources */,
6A5BBDA815E2214B00B1B485 /* 02.acv in Resources */,
6A5BBDA915E2214B00B1B485 /* 06.acv in Resources */,
6A5BBDAA15E2214B00B1B485 /* 17.acv in Resources */,
7DFAE1BA15E22A9F00C8236F /* aqua.acv in Resources */,
6A49CEA715E345070098304F /* blackframe.png in Resources */,
6A49CED815E459B00098304F /* filter-close.png in Resources */,
6A49CED915E459B00098304F /* filter-close@2x.png in Resources */,
6A49CEDA15E459B00098304F /* filter-open.png in Resources */,
6A49CEDB15E459B00098304F /* filter-open@2x.png in Resources */,
6A49CEEC15E45A5F0098304F /* camera-button.png in Resources */,
6A49CEED15E45A5F0098304F /* camera-button@2x.png in Resources */,
6A49CEEE15E45A5F0098304F /* camera-icon.png in Resources */,
6A49CEEF15E45A5F0098304F /* camera-icon@2x.png in Resources */,
6A49CEF215E460540098304F /* filter.png in Resources */,
6A49CEF315E460540098304F /* filter@2x.png in Resources */,
6A49CEFA15E461670098304F /* flash-auto.png in Resources */,
6A49CEFB15E461670098304F /* flash-auto@2x.png in Resources */,
6A49CEFC15E461670098304F /* flash-off.png in Resources */,
6A49CEFD15E461670098304F /* flash-off@2x.png in Resources */,
6A49CEFE15E461670098304F /* flash.png in Resources */,
6A49CEFF15E461670098304F /* flash@2x.png in Resources */,
6A49CF0215E4617A0098304F /* front-camera.png in Resources */,
6A49CF0315E4617A0098304F /* front-camera@2x.png in Resources */,
6A49CF0615E461B30098304F /* blur.png in Resources */,
6A49CF0715E461B30098304F /* blur@2x.png in Resources */,
6A49CF0A15E461D10098304F /* close.png in Resources */,
6A49CF0B15E461D10098304F /* close@2x.png in Resources */,
6A42CF7615E46F0E0062D3E7 /* blur-on.png in Resources */,
6A42CF7715E46F0E0062D3E7 /* blur-on@2x.png in Resources */,
6A55309515E4869600019CC9 /* 1.jpg in Resources */,
6A55309615E4869600019CC9 /* 1@2x.jpg in Resources */,
6A55309915E486A600019CC9 /* 2.jpg in Resources */,
6A55309A15E486A600019CC9 /* 2@2x.jpg in Resources */,
6A55309D15E486B300019CC9 /* 3.jpg in Resources */,
6A55309E15E486B300019CC9 /* 3@2x.jpg in Resources */,
6A5530A115E486BB00019CC9 /* 4.jpg in Resources */,
6A5530A215E486BB00019CC9 /* 4@2x.jpg in Resources */,
6A5530A515E486C300019CC9 /* 5.jpg in Resources */,
6A5530A615E486C300019CC9 /* 5@2x.jpg in Resources */,
6A5530A915E486CB00019CC9 /* 6.jpg in Resources */,
6A5530AA15E486CB00019CC9 /* 6@2x.jpg in Resources */,
6A5530AD15E486D500019CC9 /* 7.jpg in Resources */,
6A5530AE15E486D500019CC9 /* 7@2x.jpg in Resources */,
6A5530B115E486DD00019CC9 /* 8.jpg in Resources */,
6A5530B215E486DD00019CC9 /* 8@2x.jpg in Resources */,
6A5530B515E486E300019CC9 /* 9.jpg in Resources */,
6A5530B615E486E300019CC9 /* 9@2x.jpg in Resources */,
6A5530B915E486E900019CC9 /* 10.jpg in Resources */,
6A5530BA15E486E900019CC9 /* 10@2x.jpg in Resources */,
6A23390E15E6C17000CC6CB2 /* library@2x.png in Resources */,
6A23390F15E6C17000CC6CB2 /* library.png in Resources */,
6A0D0A0F165A1FFC0028E1B6 /* focus-crosshair.png in Resources */,
6A0D0A10165A1FFC0028E1B6 /* focus-crosshair@2x.png in Resources */,
6A0D0A28165A218F0028E1B6 /* Default-568h@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
6A5D9A0C15E0152D001FAD14 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6A5D9A2115E0152D001FAD14 /* main.m in Sources */,
6A5D9A2515E0152E001FAD14 /* AppDelegate.m in Sources */,
6A5D9A8815E02429001FAD14 /* DLCImagePickerController.m in Sources */,
6A5D9A8B15E02504001FAD14 /* PhotoViewController.m in Sources */,
7D0E5AB815E209AD009D19C9 /* GrayscaleContrastFilter.m in Sources */,
6A0D0A01165A1CBE0028E1B6 /* BlurOverlayView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
6A5D9A5615E01BC2001FAD14 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = GPUImage;
targetProxy = 6A5D9A5515E01BC2001FAD14 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
6A5D9A1D15E0152D001FAD14 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
6A5D9A1E15E0152D001FAD14 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
6A5D9A2615E0152E001FAD14 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "GPUImage/framework/**";
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
SDKROOT = iphoneos;
};
name = Debug;
};
6A5D9A2715E0152E001FAD14 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "GPUImage/framework/**";
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
6A5D9A2915E0152E001FAD14 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "DLCImagePickerController/DLCImagePickerController-Prefix.pch";
INFOPLIST_FILE = "DLCImagePickerController/DLCImagePickerController-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
6A5D9A2A15E0152E001FAD14 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "DLCImagePickerController/DLCImagePickerController-Prefix.pch";
INFOPLIST_FILE = "DLCImagePickerController/DLCImagePickerController-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
6A5D9A0A15E0152D001FAD14 /* Build configuration list for PBXProject "DLCImagePickerController" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6A5D9A2615E0152E001FAD14 /* Debug */,
6A5D9A2715E0152E001FAD14 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6A5D9A2815E0152E001FAD14 /* Build configuration list for PBXNativeTarget "DLCImagePickerController" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6A5D9A2915E0152E001FAD14 /* Debug */,
6A5D9A2A15E0152E001FAD14 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 6A5D9A0715E0152D001FAD14 /* Project object */;
}

View file

@ -0,0 +1,16 @@
//
// AppDelegate.h
// DLCImagePickerController
//
// Created by Dmitri Cherniak on 8/18/12.
// Copyright (c) 2012 DLC Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (retain, nonatomic) UIViewController *rootViewController;
@end

View file

@ -0,0 +1,57 @@
//
// AppDelegate.m
// DLCImagePickerController
//
// Created by Dmitri Cherniak on 8/18/12.
// Copyright (c) 2012 DLC Inc. All rights reserved.
//
#import "AppDelegate.h"
#import "PhotoViewController.h"
@implementation AppDelegate
@synthesize window = _window;
@synthesize rootViewController = _rootViewController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
self.rootViewController = [[PhotoViewController alloc] init];
self.rootViewController.view.frame = [[UIScreen mainScreen] bounds];
[self.window addSubview:self.rootViewController.view];
self.window.rootViewController = self.rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end

View file

@ -3,32 +3,36 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
<string>com.backspaces.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>NSMainNibFile~ipad</key>
<string>MainWindow-iPad</string>
<key>UIStatusBarHidden</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View file

@ -0,0 +1,14 @@
//
// Prefix header for all source files of the 'DLCImagePickerController' target in the 'DLCImagePickerController' project
//
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif

View file

@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View file

@ -0,0 +1,18 @@
//
// main.m
// DLCImagePickerController
//
// Created by Dmitri Cherniak on 8/18/12.
// Copyright (c) 2012 DLC Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

@ -0,0 +1 @@
Subproject commit c4795d05754e0a3428b3dd14a485cd6519c01c4b

View file

@ -0,0 +1,10 @@
Copyright (c) 2012, Dmitri Cherniak.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of this framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -0,0 +1,74 @@
About
-----
DLCImagePickerController is a fast, beautiful and fun way to filter and capture your photos with OpenGL and your iPhone.
The majority of the praise should be directed towards BradLarson for his [GPUImage](https://github.com/BradLarson/GPUImage) library.
To see the camera in action [download Backspaces](http://backspac.es/download).
Setup
------
When you clone the repo, you'll need to download GPUImage assets:
```
git submodule init
git submodule update
```
Features
---------
### Live Filters
Here are some examples of the filters that are included. These are being applied to the live camera stream.
![Filters](http://i.imgur.com/rJx1l.png)
or check out on outdoor shoot with the old UI [here](http://i.imgur.com/bHNAN.png)
### Radial Blur
It also has a radial blur, that you can move and pinch to your liking on the live view or captured image
![Radial blur on and off](http://i.imgur.com/RhCcV.png)
### Front Facing Camera
There is a front facing camera
![Front facing camera](http://i.imgur.com/CqOra.png)
### Apply filters/blur after capture or retake photo
After you capture the image, you can apply new filters and toggle/move/resize the blur as you please or decide to retake it
![Filters](http://i.imgur.com/TtMMm.png)
### Use an image from your camera roll
Import a picture from your camera roll and apply a filter/blur to it
![Loaded from camera roll](http://i.imgur.com/6f2fQ.png)
Example output
---------------
These images were produced using the sample program included in this repo
[Soft filter in nice daylight](http://i.imgur.com/0OncO.jpg)
[High contrast black and white with radial blur](http://i.imgur.com/6B4iz.jpg)
Contact
--------
**Dmitri Cherniak**
+ http://twitter.com/dmitric
+ http://github.com/dmitric
**Wylie Conlon**
+ http://twitter.com/wylieconlon
+ http://github.com/wylieconlon

View file

@ -38,10 +38,8 @@
#import "MenuTableViewSectionCell.h"
#import "MenuTableViewCell.h"
// photo picker
#import "DLCImagePickerController.h"
@interface MenuViewController : UITableViewController<IASKSettingsDelegate, UINavigationControllerDelegate, UIImagePickerControllerDelegate, CoreLocationControllerDelegate, DLCImagePickerDelegate>
@interface MenuViewController : UITableViewController<IASKSettingsDelegate, UINavigationControllerDelegate, UIImagePickerControllerDelegate, CoreLocationControllerDelegate, UIImagePickerControllerDelegate>
{
// ask the user about location int the home screen
CoreLocationController *coreLocationController;

View file

@ -361,15 +361,17 @@
self.viewDeckController.centerController = SharedAppDelegate.centerController;
[self selectLatestActivity];
DLCImagePickerController *picker = [[DLCImagePickerController alloc] init];
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
[coreLocationController.locMgr startUpdatingLocation];
[self presentViewController:picker animated:YES completion:nil];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
- (void)imagePickerController:(DLCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
/*
// the image itself to save in the library,
// this data must be a raw data on DLCImagePickerController. Remove the PNG representation
UIImage *pickedImage = [info objectForKey:@"image"];
@ -409,16 +411,18 @@
// stop location
[coreLocationController.locMgr stopUpdatingLocation];
*/
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
[picker dismissViewControllerAnimated:YES completion:^{
[coreLocationController.locMgr stopUpdatingLocation];
}];
}
//Creates an EXIF field for the current geo location.
- (NSMutableDictionary*)currentLocation {
NSMutableDictionary *locDict = [[NSMutableDictionary alloc] init];

View file

@ -1,20 +0,0 @@
//
// TSAVDemoAppDelegate.h
// TSAVDemo
//
// Created by Nick Hodapp aka Tom Swift on 1/19/11.
//
#import <UIKit/UIKit.h>
@interface TSAVDemoAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
UINavigationController *viewController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UINavigationController *viewController;
@end

View file

@ -1,87 +0,0 @@
//
// TSAVDemoAppDelegate.m
// TSAVDemo
//
// Created by Nick Hodapp aka Tom Swift on 1/19/11.
//
#import "TSAVDemoAppDelegate.h"
#import "TSAVDemoViewController.h"
@implementation TSAVDemoAppDelegate
@synthesize window;
@synthesize viewController;
#pragma mark -
#pragma mark Application lifecycle
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
// Add the view controller's view to the window and display.
[self.window addSubview:viewController.view];
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
/*
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
*/
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
/*
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
*/
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
/*
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
*/
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
/*
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
*/
}
- (void)applicationWillTerminate:(UIApplication *)application {
/*
Called when the application is about to terminate.
See also applicationDidEnterBackground:.
*/
}
#pragma mark -
#pragma mark Memory management
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
/*
Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
*/
}
- (void)dealloc {
[viewController release];
[window release];
[super dealloc];
}
@end

View file

@ -1,35 +0,0 @@
//
// TSAVDemoViewController.h
// TSAVDemo
//
// Created by Nick Hodapp aka Tom Swift on 1/19/11.
//
#import <UIKit/UIKit.h>
@interface TSAVDemoViewController : UIViewController <UITextFieldDelegate, UITextViewDelegate>
{
IBOutlet UITextField* _titleTextField;
IBOutlet UITextView* _messageTextView;
IBOutlet UITextField* _widthTextField;
IBOutlet UITextField* _maxHeightTextField;
IBOutlet UITextField* _buttonCountTextField;
IBOutlet UISwitch* _stackedSwitch;
IBOutlet UISwitch* _usesTextViewSwitch;
IBOutlet UISwitch* _hasInputFieldSwitch;
}
- (void) onAddMore: (id) sender;
- (void) onShow: (id) sender;
@end

View file

@ -1,94 +0,0 @@
//
// TSAVDemoViewController.m
// TSAVDemo
//
// Created by Nick Hodapp aka Tom Swift on 1/19/11.
//
#import "TSAVDemoViewController.h"
#import "TSAlertView.h"
@implementation TSAVDemoViewController
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
/*
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization.
}
return self;
}
*/
/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
}
*/
/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations.
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/
- (void) onAddMore:(id)sender
{
}
- (void) onShow:(id)sender
{
[_messageTextView resignFirstResponder];
[_titleTextField resignFirstResponder];
[_widthTextField resignFirstResponder];
[_maxHeightTextField resignFirstResponder];
TSAlertView* av = [[[TSAlertView alloc] init] autorelease];
av.title = _titleTextField.text;
av.message = _messageTextView.text;
for ( int i = 0 ; i < [_buttonCountTextField.text intValue] ; i++ )
{
[av addButtonWithTitle: [NSString stringWithFormat: @"Button %d", i]];
}
av.style = _hasInputFieldSwitch.on ? TSAlertViewStyleInput : TSAlertViewStyleNormal;
av.buttonLayout = _stackedSwitch.on ? TSAlertViewButtonLayoutStacked : TSAlertViewButtonLayoutNormal;
av.usesMessageTextView = _usesTextViewSwitch.on;
av.width = [_widthTextField.text floatValue];
av.maxHeight = [_maxHeightTextField.text floatValue];
[av show];
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
return YES;
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc. that aren't in use.
}
- (void)viewDidUnload {
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
}
@end

File diff suppressed because it is too large Load diff

View file

@ -1,726 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1056</int>
<string key="IBDocument.SystemVersion">10H574</string>
<string key="IBDocument.InterfaceBuilderVersion">823</string>
<string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">132</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="841351856">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBProxyObject" id="427554174">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUICustomObject" id="664661524">
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUINavigationController" id="231263182">
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics" id="448205775">
<int key="IBUIStatusBarStyle">2</int>
</object>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIHorizontal">NO</bool>
<object class="IBUINavigationBar" key="IBUINavigationBar" id="678464893">
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{0, 0}</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="NSMutableArray" key="IBUIViewControllers">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIViewController" id="974762162">
<reference key="IBUIToolbarItems" ref="0"/>
<object class="IBUINavigationItem" key="IBUINavigationItem" id="554259637">
<string key="IBUITitle">TSAlertView</string>
<object class="IBUIBarButtonItem" key="IBUIRightBarButtonItem" id="391122569">
<string key="IBUITitle">Show</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIStyle">2</int>
<reference key="IBUINavigationItem" ref="554259637"/>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<reference key="IBUIParentViewController" ref="231263182"/>
<string key="IBUINibName">TSAVDemoViewController</string>
<object class="IBUISimulatedToolbarMetrics" key="IBUISimulatedBottomBarMetrics"/>
<reference key="IBUISimulatedStatusBarMetrics" ref="448205775"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
</object>
</object>
<object class="IBUIWindow" id="117978783">
<nil key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{768, 1004}</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<reference key="IBUISimulatedStatusBarMetrics" ref="448205775"/>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIResizesToFullScreen">YES</bool>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="664661524"/>
</object>
<int key="connectionID">4</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="664661524"/>
<reference key="destination" ref="117978783"/>
</object>
<int key="connectionID">14</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">onShow:</string>
<reference key="source" ref="391122569"/>
<reference key="destination" ref="974762162"/>
</object>
<int key="connectionID">31</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">viewController</string>
<reference key="source" ref="664661524"/>
<reference key="destination" ref="231263182"/>
</object>
<int key="connectionID">32</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="841351856"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="664661524"/>
<reference key="parent" ref="0"/>
<string key="objectName">TSAVDemo App Delegate</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="427554174"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="117978783"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">24</int>
<reference key="object" ref="231263182"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="678464893"/>
<reference ref="974762162"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">26</int>
<reference key="object" ref="678464893"/>
<reference key="parent" ref="231263182"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">22</int>
<reference key="object" ref="974762162"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="554259637"/>
</object>
<reference key="parent" ref="231263182"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">28</int>
<reference key="object" ref="554259637"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="391122569"/>
</object>
<reference key="parent" ref="974762162"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">29</int>
<reference key="object" ref="391122569"/>
<reference key="parent" ref="554259637"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
<string>12.IBEditorWindowLastContentRect</string>
<string>12.IBLastUsedUIStatusBarStylesToTargetRuntimesMap</string>
<string>12.IBPluginDependency</string>
<string>22.CustomClassName</string>
<string>22.IBEditorWindowLastContentRect</string>
<string>22.IBLastUsedUIStatusBarStylesToTargetRuntimesMap</string>
<string>22.IBPluginDependency</string>
<string>24.IBEditorWindowLastContentRect</string>
<string>24.IBLastUsedUIStatusBarStylesToTargetRuntimesMap</string>
<string>24.IBPluginDependency</string>
<string>26.IBPluginDependency</string>
<string>29.IBPluginDependency</string>
<string>3.CustomClassName</string>
<string>3.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIApplication</string>
<string>UIResponder</string>
<string>{{525, 346}, {320, 480}}</string>
<object class="NSMutableDictionary">
<string key="NS.key.0">IBCocoaTouchFramework</string>
<integer value="0" key="NS.object.0"/>
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>TSAVDemoViewController</string>
<string>{{0, 665}, {320, 480}}</string>
<object class="NSMutableDictionary">
<string key="NS.key.0">IBCocoaTouchFramework</string>
<integer value="0" key="NS.object.0"/>
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{0, 665}, {320, 480}}</string>
<object class="NSMutableDictionary">
<string key="NS.key.0">IBCocoaTouchFramework</string>
<integer value="0" key="NS.object.0"/>
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>TSAVDemoAppDelegate</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">32</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">TSAVDemoAppDelegate</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>viewController</string>
<string>window</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UINavigationController</string>
<string>UIWindow</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>viewController</string>
<string>window</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">viewController</string>
<string key="candidateClassName">UINavigationController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">window</string>
<string key="candidateClassName">UIWindow</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/TSAVDemoAppDelegate.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">TSAVDemoAppDelegate</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">TSAVDemoViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>onAddMore:</string>
<string>onShow:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>onAddMore:</string>
<string>onShow:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">onAddMore:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">onShow:</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>_buttonCountTextField</string>
<string>_hasInputFieldSwitch</string>
<string>_maxHeightTextField</string>
<string>_messageTextView</string>
<string>_stackedSwitch</string>
<string>_titleTextField</string>
<string>_usesTextViewSwitch</string>
<string>_widthTextField</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UITextField</string>
<string>UISwitch</string>
<string>UITextField</string>
<string>UITextView</string>
<string>UISwitch</string>
<string>UITextField</string>
<string>UISwitch</string>
<string>UITextField</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>_buttonCountTextField</string>
<string>_hasInputFieldSwitch</string>
<string>_maxHeightTextField</string>
<string>_messageTextView</string>
<string>_stackedSwitch</string>
<string>_titleTextField</string>
<string>_usesTextViewSwitch</string>
<string>_widthTextField</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">_buttonCountTextField</string>
<string key="candidateClassName">UITextField</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_hasInputFieldSwitch</string>
<string key="candidateClassName">UISwitch</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_maxHeightTextField</string>
<string key="candidateClassName">UITextField</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_messageTextView</string>
<string key="candidateClassName">UITextView</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_stackedSwitch</string>
<string key="candidateClassName">UISwitch</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_titleTextField</string>
<string key="candidateClassName">UITextField</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_usesTextViewSwitch</string>
<string key="candidateClassName">UISwitch</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_widthTextField</string>
<string key="candidateClassName">UITextField</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">TSAVDemoViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIWindow</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="356479594">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIApplication</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIBarButtonItem</string>
<string key="superclassName">UIBarItem</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIBarItem</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIControl</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UINavigationBar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="746662734">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINavigationBar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UINavigationController</string>
<string key="superclassName">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="994757512">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UINavigationItem</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="746662734"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIResponder</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="356479594"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIScrollView</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchBar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchDisplayController</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISwitch</string>
<string key="superclassName">UIControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISwitch.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITextField</string>
<string key="superclassName">UIControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="447779784">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITextView</string>
<string key="superclassName">UIScrollView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<reference key="sourceIdentifier" ref="447779784"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<reference key="sourceIdentifier" ref="994757512"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIWindow</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<integer value="1056" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
<integer value="3100" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">TSAVDemo.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">132</string>
</data>
</archive>

View file

@ -1,713 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1056</int>
<string key="IBDocument.SystemVersion">10H574</string>
<string key="IBDocument.InterfaceBuilderVersion">823</string>
<string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">132</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="24"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="841351856">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="427554174">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUICustomObject" id="664661524">
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUINavigationController" id="231263182">
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
<object class="IBUINavigationBar" key="IBUINavigationBar" id="678464893">
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{0, 0}</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="NSArray" key="IBUIViewControllers">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIViewController" id="974762162">
<object class="NSArray" key="IBUIToolbarItems">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="IBUINavigationItem" key="IBUINavigationItem" id="554259637">
<reference key="IBUINavigationBar"/>
<string key="IBUITitle">TSAlertView</string>
<object class="IBUIBarButtonItem" key="IBUIRightBarButtonItem" id="391122569">
<string key="IBUITitle">Show</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIStyle">2</int>
<reference key="IBUINavigationItem" ref="554259637"/>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<reference key="IBUIParentViewController" ref="231263182"/>
<string key="IBUINibName">TSAVDemoViewController</string>
<object class="IBUISimulatedToolbarMetrics" key="IBUISimulatedBottomBarMetrics"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
</object>
</object>
<object class="IBUIWindow" id="117978783">
<nil key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{320, 480}</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIResizesToFullScreen">YES</bool>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="664661524"/>
</object>
<int key="connectionID">4</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="664661524"/>
<reference key="destination" ref="117978783"/>
</object>
<int key="connectionID">14</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">onShow:</string>
<reference key="source" ref="391122569"/>
<reference key="destination" ref="974762162"/>
</object>
<int key="connectionID">31</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">viewController</string>
<reference key="source" ref="664661524"/>
<reference key="destination" ref="231263182"/>
</object>
<int key="connectionID">32</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="841351856"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="664661524"/>
<reference key="parent" ref="0"/>
<string key="objectName">TSAVDemo App Delegate</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="427554174"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="117978783"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">24</int>
<reference key="object" ref="231263182"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="678464893"/>
<reference ref="974762162"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">26</int>
<reference key="object" ref="678464893"/>
<reference key="parent" ref="231263182"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">22</int>
<reference key="object" ref="974762162"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="554259637"/>
</object>
<reference key="parent" ref="231263182"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">28</int>
<reference key="object" ref="554259637"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="391122569"/>
</object>
<reference key="parent" ref="974762162"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">29</int>
<reference key="object" ref="391122569"/>
<reference key="parent" ref="554259637"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
<string>12.IBEditorWindowLastContentRect</string>
<string>12.IBPluginDependency</string>
<string>22.CustomClassName</string>
<string>22.IBEditorWindowLastContentRect</string>
<string>22.IBPluginDependency</string>
<string>24.IBEditorWindowLastContentRect</string>
<string>24.IBPluginDependency</string>
<string>26.IBPluginDependency</string>
<string>29.IBPluginDependency</string>
<string>3.CustomClassName</string>
<string>3.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIApplication</string>
<string>UIResponder</string>
<string>{{525, 346}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>TSAVDemoViewController</string>
<string>{{0, 665}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{0, 665}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>TSAVDemoAppDelegate</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">32</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">TSAVDemoAppDelegate</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>viewController</string>
<string>window</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UINavigationController</string>
<string>UIWindow</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>viewController</string>
<string>window</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">viewController</string>
<string key="candidateClassName">UINavigationController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">window</string>
<string key="candidateClassName">UIWindow</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/TSAVDemoAppDelegate.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">TSAVDemoAppDelegate</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">TSAVDemoViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>onAddMore:</string>
<string>onShow:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>onAddMore:</string>
<string>onShow:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">onAddMore:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">onShow:</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>_buttonCountTextField</string>
<string>_hasInputFieldSwitch</string>
<string>_maxHeightTextField</string>
<string>_messageTextView</string>
<string>_stackedSwitch</string>
<string>_titleTextField</string>
<string>_usesTextViewSwitch</string>
<string>_widthTextField</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UITextField</string>
<string>UISwitch</string>
<string>UITextField</string>
<string>UITextView</string>
<string>UISwitch</string>
<string>UITextField</string>
<string>UISwitch</string>
<string>UITextField</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>_buttonCountTextField</string>
<string>_hasInputFieldSwitch</string>
<string>_maxHeightTextField</string>
<string>_messageTextView</string>
<string>_stackedSwitch</string>
<string>_titleTextField</string>
<string>_usesTextViewSwitch</string>
<string>_widthTextField</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">_buttonCountTextField</string>
<string key="candidateClassName">UITextField</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_hasInputFieldSwitch</string>
<string key="candidateClassName">UISwitch</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_maxHeightTextField</string>
<string key="candidateClassName">UITextField</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_messageTextView</string>
<string key="candidateClassName">UITextView</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_stackedSwitch</string>
<string key="candidateClassName">UISwitch</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_titleTextField</string>
<string key="candidateClassName">UITextField</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_usesTextViewSwitch</string>
<string key="candidateClassName">UISwitch</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_widthTextField</string>
<string key="candidateClassName">UITextField</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">TSAVDemoViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIWindow</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="356479594">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIApplication</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIBarButtonItem</string>
<string key="superclassName">UIBarItem</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIBarItem</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIControl</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UINavigationBar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="746662734">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINavigationBar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UINavigationController</string>
<string key="superclassName">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="994757512">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UINavigationItem</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="746662734"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIResponder</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="356479594"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIScrollView</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchBar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchDisplayController</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISwitch</string>
<string key="superclassName">UIControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISwitch.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITextField</string>
<string key="superclassName">UIControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="447779784">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITextView</string>
<string key="superclassName">UIScrollView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<reference key="sourceIdentifier" ref="447779784"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<reference key="sourceIdentifier" ref="994757512"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIWindow</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<integer value="1056" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
<integer value="3100" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">TSAVDemo.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">132</string>
</data>
</archive>

View file

@ -1,305 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
013DD51B12ECF0D300B34A41 /* Source Code License.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 013DD51A12ECF0D300B34A41 /* Source Code License.rtf */; };
01A538A012E954E400B0F4A4 /* TSAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 01A5389912E954E400B0F4A4 /* TSAlertView.m */; };
01A538A112E954E400B0F4A4 /* TSAlertViewMessageListViewShadow.png in Resources */ = {isa = PBXBuildFile; fileRef = 01A5389A12E954E400B0F4A4 /* TSAlertViewMessageListViewShadow.png */; };
01A538A212E954E400B0F4A4 /* TSAlertViewBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 01A5389B12E954E400B0F4A4 /* TSAlertViewBackground.png */; };
01A538A312E954E400B0F4A4 /* TSAlertViewBackground2.png in Resources */ = {isa = PBXBuildFile; fileRef = 01A5389C12E954E400B0F4A4 /* TSAlertViewBackground2.png */; };
01A538A412E954E400B0F4A4 /* TSAlertViewButtonBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 01A5389D12E954E400B0F4A4 /* TSAlertViewButtonBackground.png */; };
01A538A512E954E400B0F4A4 /* TSAlertViewButtonBackground_Highlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = 01A5389E12E954E400B0F4A4 /* TSAlertViewButtonBackground_Highlighted.png */; };
01A538A612E954E400B0F4A4 /* TSAlertViewCancelButtonBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 01A5389F12E954E400B0F4A4 /* TSAlertViewCancelButtonBackground.png */; };
01A5399C12E9F4A600B0F4A4 /* TSAVDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 01A5399A12E9F4A600B0F4A4 /* TSAVDemoViewController.m */; };
01A5399D12E9F4A600B0F4A4 /* TSAVDemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 01A5399B12E9F4A600B0F4A4 /* TSAVDemoViewController.xib */; };
01A5399F12E9F4B500B0F4A4 /* MainWindow-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 01A5399E12E9F4B500B0F4A4 /* MainWindow-iPad.xib */; };
1D3623260D0F684500981E51 /* TSAVDemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* TSAVDemoAppDelegate.m */; };
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
0110735812EBA60D00BAC93C /* README.mdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.mdown; path = ../README.mdown; sourceTree = SOURCE_ROOT; };
013DD51A12ECF0D300B34A41 /* Source Code License.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = "Source Code License.rtf"; path = "../Source Code License.rtf"; sourceTree = "<group>"; };
01A5389812E954E400B0F4A4 /* TSAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSAlertView.h; sourceTree = "<group>"; };
01A5389912E954E400B0F4A4 /* TSAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSAlertView.m; sourceTree = "<group>"; };
01A5389A12E954E400B0F4A4 /* TSAlertViewMessageListViewShadow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewMessageListViewShadow.png; sourceTree = "<group>"; };
01A5389B12E954E400B0F4A4 /* TSAlertViewBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewBackground.png; sourceTree = "<group>"; };
01A5389C12E954E400B0F4A4 /* TSAlertViewBackground2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewBackground2.png; sourceTree = "<group>"; };
01A5389D12E954E400B0F4A4 /* TSAlertViewButtonBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewButtonBackground.png; sourceTree = "<group>"; };
01A5389E12E954E400B0F4A4 /* TSAlertViewButtonBackground_Highlighted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewButtonBackground_Highlighted.png; sourceTree = "<group>"; };
01A5389F12E954E400B0F4A4 /* TSAlertViewCancelButtonBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewCancelButtonBackground.png; sourceTree = "<group>"; };
01A5399912E9F4A600B0F4A4 /* TSAVDemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TSAVDemoViewController.h; path = Classes/TSAVDemoViewController.h; sourceTree = "<group>"; };
01A5399A12E9F4A600B0F4A4 /* TSAVDemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TSAVDemoViewController.m; path = Classes/TSAVDemoViewController.m; sourceTree = "<group>"; };
01A5399B12E9F4A600B0F4A4 /* TSAVDemoViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = TSAVDemoViewController.xib; path = Classes/TSAVDemoViewController.xib; sourceTree = "<group>"; };
01A5399E12E9F4B500B0F4A4 /* MainWindow-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "MainWindow-iPad.xib"; sourceTree = "<group>"; };
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D3623240D0F684500981E51 /* TSAVDemoAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TSAVDemoAppDelegate.h; path = Classes/TSAVDemoAppDelegate.h; sourceTree = "<group>"; };
1D3623250D0F684500981E51 /* TSAVDemoAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TSAVDemoAppDelegate.m; path = Classes/TSAVDemoAppDelegate.m; sourceTree = "<group>"; };
1D6058910D05DD3D006BFB54 /* TSAVDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TSAVDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* TSAVDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSAVDemo_Prefix.pch; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* TSAVDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TSAVDemo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
01A5389712E954E400B0F4A4 /* TSAlertView */ = {
isa = PBXGroup;
children = (
01A5389812E954E400B0F4A4 /* TSAlertView.h */,
01A5389912E954E400B0F4A4 /* TSAlertView.m */,
01A5389A12E954E400B0F4A4 /* TSAlertViewMessageListViewShadow.png */,
01A5389B12E954E400B0F4A4 /* TSAlertViewBackground.png */,
01A5389C12E954E400B0F4A4 /* TSAlertViewBackground2.png */,
01A5389D12E954E400B0F4A4 /* TSAlertViewButtonBackground.png */,
01A5389E12E954E400B0F4A4 /* TSAlertViewButtonBackground_Highlighted.png */,
01A5389F12E954E400B0F4A4 /* TSAlertViewCancelButtonBackground.png */,
);
name = TSAlertView;
path = ../TSAlertView;
sourceTree = "<group>";
};
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
1D6058910D05DD3D006BFB54 /* TSAVDemo.app */,
);
name = Products;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
013DD51A12ECF0D300B34A41 /* Source Code License.rtf */,
0110735812EBA60D00BAC93C /* README.mdown */,
01A5399912E9F4A600B0F4A4 /* TSAVDemoViewController.h */,
01A5399A12E9F4A600B0F4A4 /* TSAVDemoViewController.m */,
01A5399B12E9F4A600B0F4A4 /* TSAVDemoViewController.xib */,
1D3623240D0F684500981E51 /* TSAVDemoAppDelegate.h */,
1D3623250D0F684500981E51 /* TSAVDemoAppDelegate.m */,
01A5389712E954E400B0F4A4 /* TSAlertView */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
name = CustomTemplate;
sourceTree = "<group>";
};
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
32CA4F630368D1EE00C91783 /* TSAVDemo_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
sourceTree = "<group>";
};
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
01A5399E12E9F4B500B0F4A4 /* MainWindow-iPad.xib */,
28AD733E0D9D9553002E5188 /* MainWindow.xib */,
8D1107310486CEB800E47090 /* TSAVDemo-Info.plist */,
);
name = Resources;
sourceTree = "<group>";
};
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
1D30AB110D05D00D00671497 /* Foundation.framework */,
288765A40DF7441C002DB57D /* CoreGraphics.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
1D6058900D05DD3D006BFB54 /* TSAVDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TSAVDemo" */;
buildPhases = (
1D60588D0D05DD3D006BFB54 /* Resources */,
1D60588E0D05DD3D006BFB54 /* Sources */,
1D60588F0D05DD3D006BFB54 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = TSAVDemo;
productName = TSAVDemo;
productReference = 1D6058910D05DD3D006BFB54 /* TSAVDemo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TSAVDemo" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
projectDirPath = "";
projectRoot = "";
targets = (
1D6058900D05DD3D006BFB54 /* TSAVDemo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
1D60588D0D05DD3D006BFB54 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,
01A538A112E954E400B0F4A4 /* TSAlertViewMessageListViewShadow.png in Resources */,
01A538A212E954E400B0F4A4 /* TSAlertViewBackground.png in Resources */,
01A538A312E954E400B0F4A4 /* TSAlertViewBackground2.png in Resources */,
01A538A412E954E400B0F4A4 /* TSAlertViewButtonBackground.png in Resources */,
01A538A512E954E400B0F4A4 /* TSAlertViewButtonBackground_Highlighted.png in Resources */,
01A538A612E954E400B0F4A4 /* TSAlertViewCancelButtonBackground.png in Resources */,
01A5399D12E9F4A600B0F4A4 /* TSAVDemoViewController.xib in Resources */,
01A5399F12E9F4B500B0F4A4 /* MainWindow-iPad.xib in Resources */,
013DD51B12ECF0D300B34A41 /* Source Code License.rtf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
1D60588E0D05DD3D006BFB54 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
1D3623260D0F684500981E51 /* TSAVDemoAppDelegate.m in Sources */,
01A538A012E954E400B0F4A4 /* TSAlertView.m in Sources */,
01A5399C12E9F4A600B0F4A4 /* TSAVDemoViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = TSAVDemo_Prefix.pch;
INFOPLIST_FILE = "TSAVDemo-Info.plist";
PRODUCT_NAME = TSAVDemo;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
1D6058950D05DD3E006BFB54 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = TSAVDemo_Prefix.pch;
INFOPLIST_FILE = "TSAVDemo-Info.plist";
PRODUCT_NAME = TSAVDemo;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = iphoneos;
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PREBINDING = NO;
SDKROOT = iphoneos;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TSAVDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1D6058940D05DD3E006BFB54 /* Debug */,
1D6058950D05DD3E006BFB54 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TSAVDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
C01FCF5008A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
}

View file

@ -1,8 +0,0 @@
//
// Prefix header for all source files of the 'TSAVDemo' target in the 'TSAVDemo' project
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif

View file

@ -1,16 +0,0 @@
//
// main.m
// TSAVDemo
//
// Created by Nick Hodapp aka Tom Swift on 1/19/11.
//
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}

Some files were not shown because too many files have changed in this diff Show more