mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
iOS 5 compatibility.
This commit is contained in:
parent
298f05e0e4
commit
bcdbf2d638
18 changed files with 229 additions and 260 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
@ -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 (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;
|
||||
|
|
|
@ -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);
|
||||
|
@ -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 (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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
@ -105,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
|
||||
|
@ -183,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];
|
||||
}
|
||||
|
@ -212,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"]];
|
||||
|
@ -262,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]];
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -207,7 +208,7 @@
|
|||
[super buildPostBody];
|
||||
|
||||
#if DEBUG_FORM_DATA_REQUEST
|
||||
NSLog(@"%@",[self debugBodyString]);
|
||||
ASI_DEBUG_LOG(@"%@",[self debugBodyString]);
|
||||
[self setDebugBodyString:nil];
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
NewsBlurAppDelegate *appDelegate;
|
||||
|
||||
UITextField *inFolderInput;
|
||||
UITextField *newFolderInput;
|
||||
UITextField *addFolderInput;
|
||||
UITextField *siteAddressInput;
|
||||
NSMutableData *jsonString;
|
||||
NSMutableArray *autocompleteResults;
|
||||
|
@ -56,7 +56,7 @@
|
|||
|
||||
@property (nonatomic, retain) IBOutlet NewsBlurAppDelegate *appDelegate;
|
||||
@property (nonatomic, retain) IBOutlet UITextField *inFolderInput;
|
||||
@property (nonatomic, retain) IBOutlet UITextField *newFolderInput;
|
||||
@property (nonatomic, retain) IBOutlet UITextField *addFolderInput;
|
||||
@property (nonatomic, retain) IBOutlet UITextField *siteAddressInput;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIBarButtonItem *addButton;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// LoginViewController.m
|
||||
// AddViewController.m
|
||||
// NewsBlur
|
||||
//
|
||||
// Created by Samuel Clay on 10/31/10.
|
||||
|
@ -17,7 +17,7 @@
|
|||
|
||||
@synthesize appDelegate;
|
||||
@synthesize inFolderInput;
|
||||
@synthesize newFolderInput;
|
||||
@synthesize addFolderInput;
|
||||
@synthesize siteAddressInput;
|
||||
@synthesize addButton;
|
||||
@synthesize cancelButton;
|
||||
|
@ -51,8 +51,8 @@
|
|||
[inFolderInput setLeftViewMode:UITextFieldViewModeAlways];
|
||||
[folderImage release];
|
||||
UIImageView *folderImage2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"folder.png"]];
|
||||
[newFolderInput setLeftView:folderImage2];
|
||||
[newFolderInput setLeftViewMode:UITextFieldViewModeAlways];
|
||||
[addFolderInput setLeftView:folderImage2];
|
||||
[addFolderInput setLeftViewMode:UITextFieldViewModeAlways];
|
||||
[folderImage2 release];
|
||||
|
||||
UIImageView *urlImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"world.png"]];
|
||||
|
@ -62,7 +62,7 @@
|
|||
|
||||
navBar.tintColor = [UIColor colorWithRed:0.16f green:0.36f blue:0.46 alpha:0.9];
|
||||
|
||||
newFolderInput.frame = CGRectMake(self.view.frame.size.width,
|
||||
addFolderInput.frame = CGRectMake(self.view.frame.size.width,
|
||||
siteAddressInput.frame.origin.y,
|
||||
siteAddressInput.frame.size.width,
|
||||
siteAddressInput.frame.size.height);
|
||||
|
@ -95,7 +95,7 @@
|
|||
- (void)dealloc {
|
||||
[appDelegate release];
|
||||
[inFolderInput release];
|
||||
[newFolderInput release];
|
||||
[addFolderInput release];
|
||||
[siteAddressInput release];
|
||||
[addButton release];
|
||||
[cancelButton release];
|
||||
|
@ -123,7 +123,7 @@
|
|||
- (void)reload {
|
||||
[inFolderInput setText:@""];
|
||||
[siteAddressInput setText:@""];
|
||||
[newFolderInput setText:@""];
|
||||
[addFolderInput setText:@""];
|
||||
[folderPicker reloadAllComponents];
|
||||
|
||||
folderPicker.frame = CGRectMake(0, self.view.bounds.size.height,
|
||||
|
@ -138,7 +138,7 @@
|
|||
[errorLabel setText:@""];
|
||||
if (textField == inFolderInput && ![inFolderInput isFirstResponder]) {
|
||||
[siteAddressInput resignFirstResponder];
|
||||
[newFolderInput resignFirstResponder];
|
||||
[addFolderInput resignFirstResponder];
|
||||
[inFolderInput setInputView:folderPicker];
|
||||
if (folderPicker.frame.origin.y >= self.view.bounds.size.height) {
|
||||
folderPicker.hidden = NO;
|
||||
|
@ -149,7 +149,7 @@
|
|||
return NO;
|
||||
} else if (textField == siteAddressInput) {
|
||||
[self hideFolderPicker];
|
||||
} else if (textField == newFolderInput) {
|
||||
} else if (textField == addFolderInput) {
|
||||
[self hideFolderPicker];
|
||||
}
|
||||
return YES;
|
||||
|
@ -159,8 +159,12 @@
|
|||
if (textField == inFolderInput) {
|
||||
|
||||
} else if (textField == siteAddressInput) {
|
||||
[self addSite];
|
||||
} else if (textField == newFolderInput) {
|
||||
if (siteAddressInput.returnKeyType == UIReturnKeySearch) {
|
||||
[self checkSiteAddress];
|
||||
} else {
|
||||
[self addSite];
|
||||
}
|
||||
} else if (textField == addFolderInput) {
|
||||
[self addFolder];
|
||||
}
|
||||
return YES;
|
||||
|
@ -210,7 +214,7 @@
|
|||
[self.siteActivityIndicator stopAnimating];
|
||||
NSString *responseString = [request responseString];
|
||||
autocompleteResults = [[NSMutableArray alloc] initWithArray:[responseString JSONValue]];
|
||||
NSLog(@"%@", autocompleteResults);
|
||||
// NSLog(@"%@", autocompleteResults);
|
||||
[siteTable reloadData];
|
||||
}
|
||||
|
||||
|
@ -269,7 +273,7 @@
|
|||
|
||||
- (IBAction)addFolder {
|
||||
[self hideFolderPicker];
|
||||
[newFolderInput resignFirstResponder];
|
||||
[addFolderInput resignFirstResponder];
|
||||
[self.addingLabel setHidden:NO];
|
||||
[self.addingLabel setText:@"Adding Folder..."];
|
||||
[self.errorLabel setHidden:YES];
|
||||
|
@ -280,7 +284,7 @@
|
|||
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
|
||||
NSString *parent_folder = [self extractParentFolder];
|
||||
[request setPostValue:parent_folder forKey:@"parent_folder"];
|
||||
[request setPostValue:[newFolderInput text] forKey:@"folder"];
|
||||
[request setPostValue:[addFolderInput text] forKey:@"folder"];
|
||||
[request setDelegate:self];
|
||||
[request setDidFinishSelector:@selector(finishAddFolder:)];
|
||||
[request setDidFailSelector:@selector(requestFailed:)];
|
||||
|
@ -326,13 +330,13 @@
|
|||
- (void)animateLoop {
|
||||
if ([self.addTypeControl selectedSegmentIndex] == 0) {
|
||||
[addButton setTitle:@"Add Site"];
|
||||
[newFolderInput resignFirstResponder];
|
||||
[addFolderInput resignFirstResponder];
|
||||
[UIView animateWithDuration:0.5 animations:^{
|
||||
siteAddressInput.frame = CGRectMake(newFolderInput.frame.origin.x,
|
||||
siteAddressInput.frame = CGRectMake(addFolderInput.frame.origin.x,
|
||||
siteAddressInput.frame.origin.y,
|
||||
siteAddressInput.frame.size.width,
|
||||
siteAddressInput.frame.size.height);
|
||||
newFolderInput.frame = CGRectMake(self.view.frame.size.width,
|
||||
addFolderInput.frame = CGRectMake(self.view.frame.size.width,
|
||||
siteAddressInput.frame.origin.y,
|
||||
siteAddressInput.frame.size.width,
|
||||
siteAddressInput.frame.size.height);
|
||||
|
@ -340,12 +344,12 @@
|
|||
} else {
|
||||
[addButton setTitle:@"Add Folder"];
|
||||
[siteAddressInput resignFirstResponder];
|
||||
newFolderInput.frame = CGRectMake(self.view.frame.size.width,
|
||||
addFolderInput.frame = CGRectMake(self.view.frame.size.width,
|
||||
siteAddressInput.frame.origin.y,
|
||||
siteAddressInput.frame.size.width,
|
||||
siteAddressInput.frame.size.height);
|
||||
[UIView animateWithDuration:0.5 animations:^{
|
||||
newFolderInput.frame = CGRectMake(siteAddressInput.frame.origin.x,
|
||||
addFolderInput.frame = CGRectMake(siteAddressInput.frame.origin.x,
|
||||
siteAddressInput.frame.origin.y,
|
||||
siteAddressInput.frame.size.width,
|
||||
siteAddressInput.frame.size.height);
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1056</int>
|
||||
<int key="IBDocument.SystemTarget">1280</int>
|
||||
<string key="IBDocument.SystemVersion">11C74</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">1617</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.23</string>
|
||||
<string key="IBDocument.HIToolboxVersion">567.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">534</string>
|
||||
<string key="NS.object.0">933</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
|
@ -31,11 +31,8 @@
|
|||
<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>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
|
@ -81,11 +78,6 @@
|
|||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<string key="IBUIText">Adding...</string>
|
||||
<object class="NSFont" key="IBUIFont" id="24658222">
|
||||
<string key="NSName">Helvetica</string>
|
||||
<double key="NSSize">17</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<object class="NSColor" key="IBUITextColor" id="346851231">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
|
@ -97,6 +89,17 @@
|
|||
</object>
|
||||
<int key="IBUIBaselineAdjustment">1</int>
|
||||
<float key="IBUIMinimumFontSize">10</float>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription" id="992356106">
|
||||
<string key="name">Helvetica</string>
|
||||
<string key="family">Helvetica</string>
|
||||
<int key="traits">0</int>
|
||||
<double key="pointSize">17</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont" id="24658222">
|
||||
<string key="NSName">Helvetica</string>
|
||||
<double key="NSSize">17</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUILabel" id="845365385">
|
||||
<reference key="NSNextResponder" ref="973185930"/>
|
||||
|
@ -112,7 +115,6 @@
|
|||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<string key="IBUIText">Error</string>
|
||||
<reference key="IBUIFont" ref="24658222"/>
|
||||
<object class="NSColor" key="IBUITextColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC45MjQwODM3MDk3IDAuMzU5MTI4Mjk2NCAwLjIzMjY3MTI3NTcAA</bytes>
|
||||
|
@ -123,6 +125,8 @@
|
|||
<float key="IBUIMinimumFontSize">17</float>
|
||||
<int key="IBUINumberOfLines">4</int>
|
||||
<int key="IBUITextAlignment">1</int>
|
||||
<reference key="IBUIFontDescription" ref="992356106"/>
|
||||
<reference key="IBUIFont" ref="24658222"/>
|
||||
</object>
|
||||
<object class="IBUIActivityIndicatorView" id="900763914">
|
||||
<reference key="NSNextResponder" ref="973185930"/>
|
||||
|
@ -244,12 +248,13 @@
|
|||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<reference key="IBUIFont" ref="24658222"/>
|
||||
<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
|
||||
<float key="IBUIMinimumFontSize">17</float>
|
||||
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<reference key="IBUIFontDescription" ref="992356106"/>
|
||||
<reference key="IBUIFont" ref="24658222"/>
|
||||
</object>
|
||||
<object class="IBUITextField" id="782639577">
|
||||
<reference key="NSNextResponder" ref="973185930"/>
|
||||
|
@ -271,7 +276,6 @@
|
|||
<bytes key="NSWhite">MAA</bytes>
|
||||
<reference key="NSCustomColorSpace" ref="576363839"/>
|
||||
</object>
|
||||
<reference key="IBUIFont" ref="24658222"/>
|
||||
<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
|
||||
<float key="IBUIMinimumFontSize">18</float>
|
||||
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
|
||||
|
@ -282,6 +286,8 @@
|
|||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<int key="IBUIClearButtonMode">1</int>
|
||||
<reference key="IBUIFontDescription" ref="992356106"/>
|
||||
<reference key="IBUIFont" ref="24658222"/>
|
||||
</object>
|
||||
<object class="IBUITextField" id="919711053">
|
||||
<reference key="NSNextResponder" ref="973185930"/>
|
||||
|
@ -303,7 +309,6 @@
|
|||
<bytes key="NSWhite">MAA</bytes>
|
||||
<reference key="NSCustomColorSpace" ref="576363839"/>
|
||||
</object>
|
||||
<reference key="IBUIFont" ref="24658222"/>
|
||||
<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
|
||||
<float key="IBUIMinimumFontSize">18</float>
|
||||
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
|
||||
|
@ -315,6 +320,8 @@
|
|||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<int key="IBUIClearButtonMode">1</int>
|
||||
<reference key="IBUIFontDescription" ref="992356106"/>
|
||||
<reference key="IBUIFont" ref="24658222"/>
|
||||
</object>
|
||||
<object class="IBUIActivityIndicatorView" id="450177912">
|
||||
<reference key="NSNextResponder" ref="973185930"/>
|
||||
|
@ -4793,38 +4800,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
</object>
|
||||
<int key="connectionID">32</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">dataSource</string>
|
||||
<reference key="source" ref="292705575"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">33</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="292705575"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">34</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">doCancelButton</string>
|
||||
<reference key="source" ref="480078390"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">35</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="622270256"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">37</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">folderPicker</string>
|
||||
|
@ -4841,14 +4816,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
</object>
|
||||
<int key="connectionID">39</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">doAddButton</string>
|
||||
<reference key="source" ref="810673033"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">40</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">addButton</string>
|
||||
|
@ -4873,23 +4840,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
</object>
|
||||
<int key="connectionID">43</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">selectAddTypeSignup</string>
|
||||
<reference key="source" ref="151912820"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">13</int>
|
||||
</object>
|
||||
<int key="connectionID">44</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="836275523"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">45</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">navBar</string>
|
||||
|
@ -4914,22 +4864,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
</object>
|
||||
<int key="connectionID">51</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">dataSource</string>
|
||||
<reference key="source" ref="919897576"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">52</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="919897576"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">53</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">siteTable</string>
|
||||
|
@ -4938,22 +4872,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
</object>
|
||||
<int key="connectionID">54</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="919711053"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">55</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">newFolderInput</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="919711053"/>
|
||||
</object>
|
||||
<int key="connectionID">56</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">siteAddressInput</string>
|
||||
|
@ -4962,6 +4880,87 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
</object>
|
||||
<int key="connectionID">57</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">siteActivityIndicator</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="450177912"/>
|
||||
</object>
|
||||
<int key="connectionID">62</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">siteScrollView</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="39450128"/>
|
||||
</object>
|
||||
<int key="connectionID">64</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">addFolderInput</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="919711053"/>
|
||||
</object>
|
||||
<int key="connectionID">66</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">selectAddTypeSignup</string>
|
||||
<reference key="source" ref="151912820"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">13</int>
|
||||
</object>
|
||||
<int key="connectionID">44</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="836275523"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">45</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">doCancelButton</string>
|
||||
<reference key="source" ref="480078390"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">35</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">doAddButton</string>
|
||||
<reference key="source" ref="810673033"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">40</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">dataSource</string>
|
||||
<reference key="source" ref="292705575"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">33</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="292705575"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">34</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="622270256"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">37</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
|
@ -4981,19 +4980,27 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">siteActivityIndicator</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="450177912"/>
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="919711053"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">62</int>
|
||||
<int key="connectionID">55</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">siteScrollView</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="39450128"/>
|
||||
<string key="label">dataSource</string>
|
||||
<reference key="source" ref="919897576"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">64</int>
|
||||
<int key="connectionID">52</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="919897576"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">53</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
|
@ -5001,7 +5008,9 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<reference key="object" ref="0"/>
|
||||
<object class="NSArray" key="object" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
|
@ -5197,7 +5206,7 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">64</int>
|
||||
<int key="maxID">66</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
|
@ -5271,6 +5280,7 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>activityIndicator</string>
|
||||
<string>addButton</string>
|
||||
<string>addFolderInput</string>
|
||||
<string>addTypeControl</string>
|
||||
<string>addingLabel</string>
|
||||
<string>appDelegate</string>
|
||||
|
@ -5280,7 +5290,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
<string>folderPicker</string>
|
||||
<string>inFolderInput</string>
|
||||
<string>navBar</string>
|
||||
<string>newFolderInput</string>
|
||||
<string>passwordLabel</string>
|
||||
<string>passwordOptionalLabel</string>
|
||||
<string>siteActivityIndicator</string>
|
||||
|
@ -5294,6 +5303,7 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UIActivityIndicatorView</string>
|
||||
<string>UIBarButtonItem</string>
|
||||
<string>UITextField</string>
|
||||
<string>UISegmentedControl</string>
|
||||
<string>UILabel</string>
|
||||
<string>NewsBlurAppDelegate</string>
|
||||
|
@ -5303,7 +5313,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
<string>UIPickerView</string>
|
||||
<string>UITextField</string>
|
||||
<string>UINavigationBar</string>
|
||||
<string>UITextField</string>
|
||||
<string>UILabel</string>
|
||||
<string>UILabel</string>
|
||||
<string>UIActivityIndicatorView</string>
|
||||
|
@ -5320,6 +5329,7 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>activityIndicator</string>
|
||||
<string>addButton</string>
|
||||
<string>addFolderInput</string>
|
||||
<string>addTypeControl</string>
|
||||
<string>addingLabel</string>
|
||||
<string>appDelegate</string>
|
||||
|
@ -5329,7 +5339,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
<string>folderPicker</string>
|
||||
<string>inFolderInput</string>
|
||||
<string>navBar</string>
|
||||
<string>newFolderInput</string>
|
||||
<string>passwordLabel</string>
|
||||
<string>passwordOptionalLabel</string>
|
||||
<string>siteActivityIndicator</string>
|
||||
|
@ -5349,6 +5358,10 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
<string key="name">addButton</string>
|
||||
<string key="candidateClassName">UIBarButtonItem</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">addFolderInput</string>
|
||||
<string key="candidateClassName">UITextField</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">addTypeControl</string>
|
||||
<string key="candidateClassName">UISegmentedControl</string>
|
||||
|
@ -5385,10 +5398,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
<string key="name">navBar</string>
|
||||
<string key="candidateClassName">UINavigationBar</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">newFolderInput</string>
|
||||
<string key="candidateClassName">UITextField</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">passwordLabel</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
|
@ -6122,6 +6131,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
|
|||
<string key="NS.key.0">Background.png</string>
|
||||
<string key="NS.object.0">{320, 480}</string>
|
||||
</object>
|
||||
<string key="IBCocoaTouchPluginVersion">534</string>
|
||||
<string key="IBCocoaTouchPluginVersion">933</string>
|
||||
</data>
|
||||
</archive>
|
||||
|
|
|
@ -123,7 +123,6 @@
|
|||
// int statusCode = [request responseStatusCode];
|
||||
int code = [[results valueForKey:@"code"] intValue];
|
||||
if (code == -1) {
|
||||
[appDelegate showLogin];
|
||||
NSDictionary *errors = [results valueForKey:@"errors"];
|
||||
if ([errors valueForKey:@"username"]) {
|
||||
[self.errorLabel setText:[[errors valueForKey:@"username"] objectAtIndex:0]];
|
||||
|
|
|
@ -109,6 +109,7 @@
|
|||
|
||||
- (void)showAdd {
|
||||
UINavigationController *navController = self.navigationController;
|
||||
[addViewController initWithNibName:nil bundle:nil];
|
||||
[navController presentModalViewController:addViewController animated:YES];
|
||||
[addViewController reload];
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
@interface NewsBlurViewController : UIViewController
|
||||
<UITableViewDelegate, UITableViewDataSource,
|
||||
UIAlertViewDelegate, PullToRefreshViewDelegate,
|
||||
ASIHTTPRequestDelegate> {
|
||||
ASIHTTPRequestDelegate, NSCacheDelegate> {
|
||||
NewsBlurAppDelegate *appDelegate;
|
||||
|
||||
NSMutableDictionary * activeFeedLocations;
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#import "MBProgressHUD.h"
|
||||
#import "Base64.h"
|
||||
#import "JSON.h"
|
||||
#import "Utilities.h"
|
||||
|
||||
#define kTableViewRowHeight 40;
|
||||
|
||||
|
@ -72,7 +71,7 @@
|
|||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[self.feedTitlesTable deselectRowAtIndexPath:[feedTitlesTable indexPathForSelectedRow]
|
||||
animated:animated];
|
||||
if (appDelegate.activeFeedIndexPath) {
|
||||
if (appDelegate.activeFeedIndexPath && [appDelegate activeFeed]) {
|
||||
NSLog(@"Refreshing feed at %d / %d: %@", appDelegate.activeFeedIndexPath.section, appDelegate.activeFeedIndexPath.row, [appDelegate activeFeed]);
|
||||
[self.feedTitlesTable beginUpdates];
|
||||
[self.feedTitlesTable
|
||||
|
@ -169,7 +168,7 @@
|
|||
}
|
||||
|
||||
- (void)fetchFeedList:(BOOL)showLoader {
|
||||
NSLog(@"fetchFeedList: %d %d", showLoader, appDelegate.navigationController.topViewController == appDelegate.feedsViewController);
|
||||
// NSLog(@"fetchFeedList: %d %d", showLoader, appDelegate.navigationController.topViewController == appDelegate.feedsViewController);
|
||||
if (showLoader && appDelegate.navigationController.topViewController == appDelegate.feedsViewController) {
|
||||
[MBProgressHUD hideHUDForView:self.view animated:YES];
|
||||
MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
|
||||
|
@ -375,7 +374,7 @@
|
|||
|
||||
FeedTableCell *cell = (FeedTableCell *)[tableView dequeueReusableCellWithIdentifier:FeedCellIdentifier];
|
||||
if (cell == nil) {
|
||||
cell = [[[FeedTableCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"FeedCellIdentifier"] autorelease];
|
||||
cell = [[[FeedTableCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"FeedCellIdentifier"] autorelease];
|
||||
cell.appDelegate = (NewsBlurAppDelegate *)[[UIApplication sharedApplication] delegate];
|
||||
|
||||
}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
//
|
||||
// Utilities.h
|
||||
// NewsBlur
|
||||
//
|
||||
// Created by Samuel Clay on 10/13/11.
|
||||
// Copyright 2011 NewsBlur. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface Utilities : NSObject {
|
||||
|
||||
}
|
||||
|
||||
+ (void)cacheImage:(UIImage *)image forFeedId:(NSString *)feedId;
|
||||
+ (UIImage *)getCachedImage:(NSString *)feedId;
|
||||
|
||||
@end
|
|
@ -1,32 +0,0 @@
|
|||
//
|
||||
// Utilities.m
|
||||
// NewsBlur
|
||||
//
|
||||
// Created by Samuel Clay on 10/13/11.
|
||||
// Copyright 2011 NewsBlur. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Utilities.h"
|
||||
|
||||
@implementation Utilities
|
||||
|
||||
+ (void)cacheImage:(UIImage *)image forFeedId:(NSString *)feedId {
|
||||
// UIImage *image = [[UIImage alloc] initWithData:imageData];
|
||||
NSString *path = [NSString stringWithFormat:@"%@_favicon.png", feedId];
|
||||
[UIImagePNGRepresentation(image) writeToFile:path atomically:YES];
|
||||
[image release];
|
||||
}
|
||||
|
||||
+ (UIImage *)getCachedImage:(NSString *)feedId {
|
||||
NSString *path = [NSString stringWithFormat:@"%@_favicon.png", feedId];
|
||||
|
||||
if([[NSFileManager defaultManager] fileExistsAtPath:path]) {
|
||||
return [UIImage imageWithContentsOfFile:path];
|
||||
} else {
|
||||
UIImage *image = [UIImage imageNamed:@"world.png"];
|
||||
return image;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@end
|
|
@ -25,7 +25,6 @@
|
|||
78095E3F128EF35400230C8E /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 78095E3E128EF35400230C8E /* CFNetwork.framework */; };
|
||||
78095E43128EF37E00230C8E /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 78095E42128EF37E00230C8E /* MobileCoreServices.framework */; };
|
||||
78095E45128EF37E00230C8E /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 78095E44128EF37E00230C8E /* SystemConfiguration.framework */; };
|
||||
78095E47128EF37F00230C8E /* libz.1.2.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 78095E46128EF37F00230C8E /* libz.1.2.3.dylib */; };
|
||||
78095EC9128F30B500230C8E /* OriginalStoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 78095EC7128F30B500230C8E /* OriginalStoryViewController.m */; };
|
||||
78095ECA128F30B500230C8E /* OriginalStoryViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 78095EC8128F30B500230C8E /* OriginalStoryViewController.xib */; };
|
||||
7842ECF811D44A530066CF9D /* StoryDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7842ECF611D44A530066CF9D /* StoryDetailViewController.m */; };
|
||||
|
@ -78,7 +77,7 @@
|
|||
FF79E11E13EB756A0095C852 /* arrow@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FF79E11A13EB756A0095C852 /* arrow@2x.png */; };
|
||||
FF79E11F13EB756A0095C852 /* PullToRefreshView.m in Sources */ = {isa = PBXBuildFile; fileRef = FF79E11C13EB756A0095C852 /* PullToRefreshView.m */; };
|
||||
FF7DB4C413F58486008176BF /* folder.png in Resources */ = {isa = PBXBuildFile; fileRef = FF7DB4C313F58486008176BF /* folder.png */; };
|
||||
FF9295DC1447462D001F76C6 /* Utilities.m in Sources */ = {isa = PBXBuildFile; fileRef = FF9295DB1447462D001F76C6 /* Utilities.m */; };
|
||||
FFAD4971144A386100BA6919 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FFAD4970144A386100BA6919 /* libz.dylib */; };
|
||||
FFCE7AE813D49165009A98F6 /* FeedTableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FFCE7AE613D49165009A98F6 /* FeedTableCell.m */; };
|
||||
FFD2BB8B1401AD85004277DA /* libTestFlight.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FFD2BB8A1401AD85004277DA /* libTestFlight.a */; };
|
||||
FFD53379143E60B100C5555D /* add_button.png in Resources */ = {isa = PBXBuildFile; fileRef = FFD53377143E60B100C5555D /* add_button.png */; };
|
||||
|
@ -209,8 +208,7 @@
|
|||
FF79E11B13EB756A0095C852 /* PullToRefreshView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PullToRefreshView.h; sourceTree = "<group>"; };
|
||||
FF79E11C13EB756A0095C852 /* PullToRefreshView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PullToRefreshView.m; sourceTree = "<group>"; };
|
||||
FF7DB4C313F58486008176BF /* folder.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = folder.png; sourceTree = "<group>"; };
|
||||
FF9295DA1447462D001F76C6 /* Utilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Utilities.h; sourceTree = "<group>"; };
|
||||
FF9295DB1447462D001F76C6 /* Utilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Utilities.m; sourceTree = "<group>"; };
|
||||
FFAD4970144A386100BA6919 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
|
||||
FFCE7AE513D49165009A98F6 /* FeedTableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FeedTableCell.h; path = ../NewsBlur.xcodeproj/FeedTableCell.h; sourceTree = "<group>"; };
|
||||
FFCE7AE613D49165009A98F6 /* FeedTableCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FeedTableCell.m; path = ../NewsBlur.xcodeproj/FeedTableCell.m; sourceTree = "<group>"; };
|
||||
FFD2BB891401AD85004277DA /* TestFlight.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestFlight.h; sourceTree = "<group>"; };
|
||||
|
@ -236,6 +234,7 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FFAD4971144A386100BA6919 /* libz.dylib in Frameworks */,
|
||||
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
|
||||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
|
||||
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */,
|
||||
|
@ -243,7 +242,6 @@
|
|||
78095E3F128EF35400230C8E /* CFNetwork.framework in Frameworks */,
|
||||
78095E43128EF37E00230C8E /* MobileCoreServices.framework in Frameworks */,
|
||||
78095E45128EF37E00230C8E /* SystemConfiguration.framework in Frameworks */,
|
||||
78095E47128EF37F00230C8E /* libz.1.2.3.dylib in Frameworks */,
|
||||
FFD2BB8B1401AD85004277DA /* libTestFlight.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
@ -283,8 +281,6 @@
|
|||
78095EC6128F30B500230C8E /* OriginalStoryViewController.h */,
|
||||
78095EC7128F30B500230C8E /* OriginalStoryViewController.m */,
|
||||
78095EC8128F30B500230C8E /* OriginalStoryViewController.xib */,
|
||||
FF9295DA1447462D001F76C6 /* Utilities.h */,
|
||||
FF9295DB1447462D001F76C6 /* Utilities.m */,
|
||||
);
|
||||
path = Classes;
|
||||
sourceTree = "<group>";
|
||||
|
@ -300,6 +296,7 @@
|
|||
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FFAD4970144A386100BA6919 /* libz.dylib */,
|
||||
080E96DDFE201D6D7F000001 /* Classes */,
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
|
@ -481,7 +478,7 @@
|
|||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0410;
|
||||
LastUpgradeCheck = 0420;
|
||||
ORGANIZATIONNAME = NewsBlur;
|
||||
};
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NewsBlur" */;
|
||||
|
@ -595,7 +592,6 @@
|
|||
FF56EC7B13F755E40009D8E0 /* MBProgressHUD.m in Sources */,
|
||||
FF5EA47F143B691000B7563D /* AddViewController.m in Sources */,
|
||||
FFD887F01445F1E800385399 /* AddSiteAutocompleteCell.m in Sources */,
|
||||
FF9295DC1447462D001F76C6 /* Utilities.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -614,7 +610,7 @@
|
|||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = NewsBlur_Prefix.pch;
|
||||
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
||||
GCC_VERSION = "";
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = "NewsBlur-Info.plist";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
|
@ -641,14 +637,17 @@
|
|||
COPY_PHASE_STRIP = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = NewsBlur_Prefix.pch;
|
||||
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
||||
GCC_VERSION = "";
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = "NewsBlur-Info.plist";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"-all_load",
|
||||
);
|
||||
PRODUCT_NAME = NewsBlur;
|
||||
PROVISIONING_PROFILE = "";
|
||||
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
|
||||
|
@ -663,15 +662,12 @@
|
|||
CODE_SIGN_IDENTITY = "iPhone Distribution: Samuel Clay";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Samuel Clay";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_C_LANGUAGE_STANDARD = "compiler-default";
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "~/code/three20/Build/Products/three20";
|
||||
HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/**";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
|
||||
OTHER_LDFLAGS = (
|
||||
"-all_load",
|
||||
"-ObjC",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PROVISIONING_PROFILE = "382118CB-42EB-4479-93DB-9963EFFA6DDD";
|
||||
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "382118CB-42EB-4479-93DB-9963EFFA6DDD";
|
||||
RUN_CLANG_STATIC_ANALYZER = YES;
|
||||
|
@ -687,11 +683,13 @@
|
|||
CODE_SIGN_IDENTITY = "iPhone Distribution: Samuel Clay";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Samuel Clay";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_C_LANGUAGE_STANDARD = "compiler-default";
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/**";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
|
||||
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PROVISIONING_PROFILE = "382118CB-42EB-4479-93DB-9963EFFA6DDD";
|
||||
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "382118CB-42EB-4479-93DB-9963EFFA6DDD";
|
||||
SDKROOT = iphoneos;
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
// TestFlight.h
|
||||
// libTestFlight
|
||||
//
|
||||
// Created by Colin Humber on 8/25/10.
|
||||
// Copyright 2010 23 Divide Apps. All rights reserved.
|
||||
// Created by Jonathan Janzen on 06/11/11.
|
||||
// Copyright 2011 TestFlight. All rights reserved.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#define TESTFLIGHT_SDK_VERSION @"0.7.2"
|
||||
|
||||
@interface TestFlight : NSObject {
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Add table
Reference in a new issue