iOS: Add Site modernization

This commit is contained in:
David Sinclair 2016-03-17 20:40:09 -07:00
parent 91470ceb9b
commit 49e2cb7604
13 changed files with 164 additions and 246 deletions

View file

@ -13,28 +13,7 @@
@class NewsBlurAppDelegate;
@interface AddSiteViewController : UIViewController
<UITextFieldDelegate, UIPickerViewDelegate, UIPickerViewDataSource, UITableViewDelegate, UITableViewDataSource, ASIHTTPRequestDelegate> {
NewsBlurAppDelegate *appDelegate;
UITextField *inFolderInput;
UITextField *addFolderInput;
UITextField *siteAddressInput;
NSMutableData *jsonString;
NSMutableArray *autocompleteResults;
UIBarButtonItem *addButton;
UIBarButtonItem *cancelButton;
UIPickerView *folderPicker;
UITableView *siteTable;
UIScrollView *siteScrollView;
UIButton *addFolderButton;
UINavigationBar *navBar;
UIActivityIndicatorView *activityIndicator;
UIActivityIndicatorView *siteActivityIndicator;
UILabel *addingLabel;
UILabel *errorLabel;
}
<UITextFieldDelegate, UITableViewDelegate, UITableViewDataSource, ASIHTTPRequestDelegate>
- (void)reload;
- (IBAction)addSite;
@ -42,8 +21,6 @@
- (IBAction)doCancelButton;
- (IBAction)doAddButton;
- (NSString *)extractParentFolder;
- (void)showFolderPicker;
- (void)hideFolderPicker;
- (IBAction)checkSiteAddress;
- (void)reloadSearchResults;
- (IBAction)toggleAddFolder:(id)sender;
@ -56,7 +33,6 @@
@property (nonatomic) IBOutlet UIBarButtonItem *addButton;
@property (nonatomic) IBOutlet UIBarButtonItem *cancelButton;
@property (nonatomic) IBOutlet UIPickerView *folderPicker;
@property (nonatomic) IBOutlet UITableView *siteTable;
@property (nonatomic) IBOutlet UIScrollView *siteScrollView;
@property (nonatomic) IBOutlet UIButton *addFolderButton;

View file

@ -13,6 +13,7 @@
#import "ASIHTTPRequest.h"
#import "ASIFormDataRequest.h"
#import "NBContainerViewController.h"
#import "MenuViewController.h"
#import "SBJson4.h"
#import "Base64.h"
@ -25,26 +26,6 @@
@implementation AddSiteViewController
@synthesize appDelegate;
@synthesize inFolderInput;
@synthesize addFolderInput;
@synthesize siteAddressInput;
@synthesize addButton;
@synthesize cancelButton;
@synthesize folderPicker;
@synthesize siteTable;
@synthesize siteScrollView;
@synthesize jsonString;
@synthesize autocompleteResults;
@synthesize navBar;
@synthesize activityIndicator;
@synthesize siteActivityIndicator;
@synthesize addingLabel;
@synthesize errorLabel;
@synthesize activeTerm_;
@synthesize searchResults_;
@synthesize addFolderButton;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
@ -52,46 +33,53 @@
return self;
}
- (void)viewDidLoad {
- (void)viewDidLoad {
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(doCancelButton)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Add Site" style:UIBarButtonItemStyleDone target:self action:@selector(addSite)];
UIImageView *folderImage = [[UIImageView alloc]
initWithImage:[UIImage imageNamed:@"g_icn_folder.png"]];
initWithImage:[UIImage imageNamed:@"g_icn_folder_sm.png"]];
folderImage.frame = CGRectMake(0, 0, 24, 16);
[folderImage setContentMode:UIViewContentModeRight];
[inFolderInput setLeftView:folderImage];
[inFolderInput setLeftViewMode:UITextFieldViewModeAlways];
[self.inFolderInput setLeftView:folderImage];
[self.inFolderInput setLeftViewMode:UITextFieldViewModeAlways];
// If you want to show a disclosure arrow; don't really need it, though.
// UIImageView *disclosureImage = [[UIImageView alloc]
// initWithImage:[UIImage imageNamed:@"accessory_disclosure.png"]];
// disclosureImage.frame = CGRectMake(0, 0, 24, 20);
// [disclosureImage setContentMode:UIViewContentModeLeft];
// [inFolderInput setRightView:disclosureImage];
// [inFolderInput setRightViewMode:UITextFieldViewModeAlways];
UIImageView *folderImage2 = [[UIImageView alloc]
initWithImage:[UIImage imageNamed:@"g_icn_folder_rss.png"]];
initWithImage:[UIImage imageNamed:@"g_icn_folder_rss_sm.png"]];
folderImage2.frame = CGRectMake(0, 0, 24, 16);
[folderImage2 setContentMode:UIViewContentModeRight];
[addFolderInput setLeftView:folderImage2];
[addFolderInput setLeftViewMode:UITextFieldViewModeAlways];
[self.addFolderInput setLeftView:folderImage2];
[self.addFolderInput setLeftViewMode:UITextFieldViewModeAlways];
UIImageView *urlImage = [[UIImageView alloc]
initWithImage:[UIImage imageNamed:@"world.png"]];
urlImage.frame = CGRectMake(0, 0, 24, 16);
[urlImage setContentMode:UIViewContentModeRight];
[siteAddressInput setLeftView:urlImage];
[siteAddressInput setLeftViewMode:UITextFieldViewModeAlways];
[self.siteAddressInput setLeftView:urlImage];
[self.siteAddressInput setLeftViewMode:UITextFieldViewModeAlways];
self.siteTable.hidden = YES;
self.activeTerm_ = @"";
self.searchResults_ = [[NSMutableDictionary alloc] init];
self.folderPicker.delegate = self;
[super viewDidLoad];
}
- (void)viewWillAppear:(BOOL)animated {
[self.errorLabel setHidden:YES];
[self.addingLabel setHidden:YES];
[self.folderPicker setHidden:YES];
[self.siteScrollView setAlpha:0];
[self.activityIndicator stopAnimating];
self.view.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
self.siteTable.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
self.folderPicker.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
[super viewWillAppear:animated];
}
@ -111,26 +99,25 @@
[self.activityIndicator stopAnimating];
[super viewDidAppear:animated];
[self.inFolderInput becomeFirstResponder];
[self.siteAddressInput becomeFirstResponder];
}
- (CGSize)preferredContentSize {
CGSize size = CGSizeMake(320.0, 96.0);
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
self.siteTable.hidden = NO;
self.siteScrollView.frame = CGRectMake(self.siteScrollView.frame.origin.x,
self.siteScrollView.frame.origin.y,
self.view.frame.size.width,
295);
if (self.addFolderButton.selected) {
size.height += 39.0;
}
}
- (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.
if (!self.siteTable.hidden) {
size.height += 215.0;
}
self.navigationController.preferredContentSize = size;
return size;
}
- (IBAction)doCancelButton {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[self.appDelegate hidePopover];
@ -144,37 +131,31 @@
}
- (void)reload {
[inFolderInput setText:@"— Top Level —"];
[siteAddressInput setText:@""];
[addFolderInput setText:@""];
[folderPicker reloadAllComponents];
// Force the view to load.
[self view];
folderPicker.frame = CGRectMake(0, self.view.bounds.size.height,
folderPicker.frame.size.width,
folderPicker.frame.size.height);
[self.inFolderInput setText:@"— Top Level —"];
[self.siteAddressInput setText:@""];
[self.addFolderInput setText:@""];
}
#pragma mark -
#pragma mark Add Site
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
[errorLabel setText:@""];
if (textField == inFolderInput && ![inFolderInput isFirstResponder]) {
[self showFolderPicker];
[self.errorLabel setText:@""];
if (textField == self.inFolderInput && ![self.inFolderInput isFirstResponder]) {
[self showFolderMenu];
return NO;
} else if (textField == siteAddressInput) {
[self hideFolderPicker];
} else if (textField == addFolderInput) {
[self hideFolderPicker];
}
return YES;
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
if (textField == inFolderInput) {
if (textField == self.inFolderInput) {
} else if (textField == siteAddressInput) {
if (siteAddressInput.returnKeyType == UIReturnKeySearch) {
} else if (textField == self.siteAddressInput) {
if (self.siteAddressInput.returnKeyType == UIReturnKeySearch) {
[self checkSiteAddress];
} else {
[self addSite];
@ -184,13 +165,11 @@
}
- (IBAction)checkSiteAddress {
NSString *phrase = siteAddressInput.text;
NSString *phrase = self.siteAddressInput.text;
if ([phrase length] == 0) {
[UIView animateWithDuration:.35 delay:0 options:UIViewAnimationOptionAllowUserInteraction
animations:^{
[siteScrollView setAlpha:0];
} completion:nil];
self.siteTable.hidden = YES;
[self preferredContentSize];
return;
}
@ -201,16 +180,16 @@
}
NSInteger periodLoc = [phrase rangeOfString:@"."].location;
if (periodLoc != NSNotFound && siteAddressInput.returnKeyType != UIReturnKeyDone) {
if (periodLoc != NSNotFound && self.siteAddressInput.returnKeyType != UIReturnKeyDone) {
// URL
[siteAddressInput setReturnKeyType:UIReturnKeyDone];
[siteAddressInput resignFirstResponder];
[siteAddressInput becomeFirstResponder];
} else if (periodLoc == NSNotFound && siteAddressInput.returnKeyType != UIReturnKeySearch) {
[self.siteAddressInput setReturnKeyType:UIReturnKeyDone];
[self.siteAddressInput resignFirstResponder];
[self.siteAddressInput becomeFirstResponder];
} else if (periodLoc == NSNotFound && self.siteAddressInput.returnKeyType != UIReturnKeySearch) {
// Search
[siteAddressInput setReturnKeyType:UIReturnKeySearch];
[siteAddressInput resignFirstResponder];
[siteAddressInput becomeFirstResponder];
[self.siteAddressInput setReturnKeyType:UIReturnKeySearch];
[self.siteAddressInput resignFirstResponder];
[self.siteAddressInput becomeFirstResponder];
}
[self.siteActivityIndicator startAnimating];
@ -234,7 +213,7 @@
NSString *query = [NSString stringWithFormat:@"%@", [results objectForKey:@"term"]];
NSString *phrase = siteAddressInput.text;
NSString *phrase = self.siteAddressInput.text;
// cache the results
[self.searchResults_ setValue:[results objectForKey:@"feeds"] forKey:query];
@ -249,27 +228,28 @@
}
- (void)reloadSearchResults {
if ([siteAddressInput.text length] > 0 && [autocompleteResults count] > 0) {
if ([self.siteAddressInput.text length] > 0 && [self.autocompleteResults count] > 0) {
[UIView animateWithDuration:.35 delay:0 options:UIViewAnimationOptionAllowUserInteraction
animations:^{
[siteScrollView setAlpha:1];
[self.siteScrollView setAlpha:1];
} completion:nil];
} else {
[UIView animateWithDuration:.35 delay:0 options:UIViewAnimationOptionAllowUserInteraction
animations:^{
[siteScrollView setAlpha:0];
[self.siteScrollView setAlpha:0];
} completion:nil];
}
[self.siteActivityIndicator stopAnimating];
self.siteTable.hidden = NO;
[siteTable reloadData];
[self.siteTable reloadData];
[self preferredContentSize];
}
- (IBAction)addSite {
[self hideFolderPicker];
self.siteTable.hidden = YES;
[siteAddressInput resignFirstResponder];
[self preferredContentSize];
[self.siteAddressInput resignFirstResponder];
[self.addingLabel setHidden:NO];
[self.addingLabel setText:@"Adding site..."];
[self.errorLabel setHidden:YES];
@ -280,9 +260,9 @@
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
NSString *parent_folder = [self extractParentFolder];
[request setPostValue:parent_folder forKey:@"folder"];
[request setPostValue:[siteAddressInput text] forKey:@"url"];
if (addFolderButton.selected && [addFolderInput.text length]) {
[request setPostValue:[addFolderInput text] forKey:@"new_folder"];
[request setPostValue:[self.siteAddressInput text] forKey:@"url"];
if (self.addFolderButton.selected && [self.addFolderInput.text length]) {
[request setPostValue:[self.addFolderInput text] forKey:@"new_folder"];
}
[request setDelegate:self];
[request setDidFinishSelector:@selector(requestFinished:)];
@ -319,7 +299,7 @@
}
- (NSString *)extractParentFolder {
NSString *parent_folder = [inFolderInput text];
NSString *parent_folder = [self.inFolderInput text];
NSInteger folder_loc = [parent_folder rangeOfString:@" - " options:NSBackwardsSearch].location;
if ([parent_folder length] && folder_loc != NSNotFound) {
parent_folder = [parent_folder substringFromIndex:(folder_loc + 3)];
@ -335,11 +315,11 @@
#pragma mark Add Folder
- (IBAction)toggleAddFolder:(id)sender {
if (!addFolderButton.selected) {
addFolderButton.selected = YES;
if (!self.addFolderButton.selected) {
self.addFolderButton.selected = YES;
[UIView animateWithDuration:.35 delay:0 options:UIViewAnimationOptionAllowUserInteraction
animations:^{
addFolderInput.alpha = 1;
self.addFolderInput.alpha = 1;
self.siteScrollView.frame = CGRectMake(self.siteScrollView.frame.origin.x,
self.siteScrollView.frame.origin.y + 40,
self.view.frame.size.width,
@ -347,16 +327,18 @@
} completion:nil];
} else {
addFolderButton.selected = NO;
self.addFolderButton.selected = NO;
[UIView animateWithDuration:.35 delay:0 options:UIViewAnimationOptionAllowUserInteraction
animations:^{
addFolderInput.alpha = 0;
self.addFolderInput.alpha = 0;
self.siteScrollView.frame = CGRectMake(self.siteScrollView.frame.origin.x,
self.siteScrollView.frame.origin.y - 40,
self.view.frame.size.width,
self.siteScrollView.frame.size.height);
} completion:nil];
}
[self preferredContentSize];
}
- (void)requestFailed:(ASIHTTPRequest *)request {
@ -367,13 +349,11 @@
NSLog(@"Error: %@", error);
[self.errorLabel setText:error.localizedDescription];
self.siteTable.hidden = YES;
[self preferredContentSize];
}
#pragma mark -
#pragma mark Folder Picker
- (NSArray *)folders {
return _.without([appDelegate dictFoldersArray],
return _.without([self.appDelegate dictFoldersArray],
@[@"saved_stories",
@"read_stories",
@"river_blurblogs",
@ -381,68 +361,42 @@
@"everything"]);
}
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
return 1;
}
- (NSInteger)pickerView:(UIPickerView *)pickerView
numberOfRowsInComponent:(NSInteger)component {
return [[self folders] count] + 1;
}
- (NSAttributedString *)pickerView:(UIPickerView *)pickerView
attributedTitleForRow:(NSInteger)row
forComponent:(NSInteger)component {
NSString *title = nil;
NSDictionary *attributes = @{NSForegroundColorAttributeName : UIColorFromRGB(NEWSBLUR_BLACK_COLOR)};
- (void)showFolderMenu {
MenuViewController *viewController = [MenuViewController new];
viewController.title = @"Add To";
if (row == 0) {
title = @"— Top Level —";
} else {
title = [[self folders] objectAtIndex:row - 1];
}
__weak __typeof(&*self)weakSelf = self;
return [[NSAttributedString alloc] initWithString:title attributes:attributes];
}
- (void)pickerView:(UIPickerView *)pickerView
didSelectRow:(NSInteger)row
inComponent:(NSInteger)component {
NSString *folder_title;
if (row == 0) {
folder_title = @"— Top Level —";
} else {
folder_title = [[self folders] objectAtIndex:row-1];
}
[inFolderInput setText:folder_title];
}
- (void)showFolderPicker {
if (![[self folders] count]) return;
[viewController addTitle:@"Top Level" iconName:@"menu_icn_all.png" selectionShouldDismiss:NO handler:^{
weakSelf.inFolderInput.text = @"— Top Level —";
[self.navigationController popViewControllerAnimated:YES];
}];
[siteAddressInput resignFirstResponder];
[addFolderInput resignFirstResponder];
[inFolderInput setInputView:folderPicker];
[folderPicker selectRow:0 inComponent:0 animated:NO];
for (int i=0; i < [[self folders] count]; i++) {
if ([[[self folders] objectAtIndex:i] isEqualToString:inFolderInput.text]) {
[folderPicker selectRow:i+1 inComponent:0 animated:NO];
break;
NSArray *folders = self.folders;
for (NSString *folder in folders) {
NSString *title = folder;
NSString *iconName = @"menu_icn_move.png";
NSArray *components = [title componentsSeparatedByString:@" - "];
title = components.lastObject;
for (NSUInteger idx = 0; idx < components.count; idx++) {
title = [@"\t" stringByAppendingString:title];
}
}
if (folderPicker.frame.origin.y >= self.view.bounds.size.height) {
folderPicker.hidden = NO;
[UIView animateWithDuration:.35 animations:^{
folderPicker.frame = CGRectMake(0, self.view.bounds.size.height - folderPicker.frame.size.height, folderPicker.frame.size.width, folderPicker.frame.size.height);
[viewController addTitle:title iconName:iconName selectionShouldDismiss:NO handler:^{
weakSelf.inFolderInput.text = folder;
[self.navigationController popViewControllerAnimated:YES];
}];
}
self.siteTable.hidden = YES;
}
- (void)hideFolderPicker {
[UIView animateWithDuration:.35 animations:^{
folderPicker.frame = CGRectMake(0, self.view.bounds.size.height, folderPicker.frame.size.width, folderPicker.frame.size.height);
}];
if ([self.inFolderInput.text isEqualToString:@"— Top Level —"]) {
viewController.checkedRow = 0;
} else {
viewController.checkedRow = [folders indexOfObject:self.inFolderInput.text] + 1;
}
[self.appDelegate.addSiteNavigationController pushViewController:viewController animated:YES];
}
#pragma mark -
@ -450,7 +404,7 @@ numberOfRowsInComponent:(NSInteger)component {
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [autocompleteResults count];
return [self.autocompleteResults count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView
@ -469,7 +423,7 @@ numberOfRowsInComponent:(NSInteger)component {
}
}
NSDictionary *result = [autocompleteResults objectAtIndex:indexPath.row];
NSDictionary *result = [self.autocompleteResults objectAtIndex:indexPath.row];
int subs = [[result objectForKey:@"num_subscribers"] intValue];
NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setPositiveFormat:@"#,###"];
@ -498,12 +452,10 @@ numberOfRowsInComponent:(NSInteger)component {
- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSDictionary *result = [autocompleteResults objectAtIndex:indexPath.row];
NSDictionary *result = [self.autocompleteResults objectAtIndex:indexPath.row];
[self.siteAddressInput setText:[result objectForKey:@"value"]];
// [self addSite]; // Don't auto-add. Let user select folder.
[UIView animateWithDuration:.35 animations:^{
siteScrollView.alpha = 0;
}];
self.siteTable.hidden = YES;
[self preferredContentSize];
}
@end
@end

View file

@ -167,6 +167,7 @@ SFSafariViewControllerDelegate> {
@property (nonatomic) IBOutlet StoryDetailViewController *storyDetailViewController;
@property (nonatomic) IBOutlet StoryPageControl *storyPageControl;
@property (nonatomic) IBOutlet LoginViewController *loginViewController;
@property (nonatomic, strong) UINavigationController *addSiteNavigationController;
@property (nonatomic) IBOutlet AddSiteViewController *addSiteViewController;
@property (nonatomic) IBOutlet MoveSiteViewController *moveSiteViewController;
@property (nonatomic) IBOutlet TrainerViewController *trainerViewController;

View file

@ -1516,6 +1516,15 @@
}
}
- (UINavigationController *)addSiteNavigationController {
if (!_addSiteNavigationController) {
self.addSiteNavigationController = [[UINavigationController alloc] initWithRootViewController:self.addSiteViewController];
self.addSiteNavigationController.delegate = self;
}
return _addSiteNavigationController;
}
- (UINavigationController *)fontSettingsNavigationController {
if (!_fontSettingsNavigationController) {
self.fontSettingsNavigationController = [[UINavigationController alloc] initWithRootViewController:self.fontSettingsViewController];

View file

@ -834,7 +834,8 @@ static UIFont *userLabelFont;
}
- (IBAction)tapAddSite:(id)sender {
[self.appDelegate showPopoverWithViewController:self.appDelegate.addSiteViewController contentSize:CGSizeMake(320, 355) barButtonItem:self.addBarButton];
[self.appDelegate.addSiteNavigationController popToRootViewControllerAnimated:NO];
[self.appDelegate showPopoverWithViewController:self.appDelegate.addSiteNavigationController contentSize:CGSizeMake(320, 96) barButtonItem:self.addBarButton];
[self.appDelegate.addSiteViewController reload];
}

View file

@ -40,6 +40,12 @@
176129611C630AEB00702FE4 /* mute_feed_off@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1761295D1C630AEB00702FE4 /* mute_feed_off@2x.png */; };
176129621C630AEB00702FE4 /* mute_feed_on.png in Resources */ = {isa = PBXBuildFile; fileRef = 1761295E1C630AEB00702FE4 /* mute_feed_on.png */; };
176129631C630AEB00702FE4 /* mute_feed_on@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1761295F1C630AEB00702FE4 /* mute_feed_on@2x.png */; };
17876B9E1C9911D40055DD15 /* g_icn_folder_rss_sm.png in Resources */ = {isa = PBXBuildFile; fileRef = 17876B9A1C9911D40055DD15 /* g_icn_folder_rss_sm.png */; };
17876B9F1C9911D40055DD15 /* g_icn_folder_rss_sm@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17876B9B1C9911D40055DD15 /* g_icn_folder_rss_sm@2x.png */; };
17876BA01C9911D40055DD15 /* g_icn_folder_sm.png in Resources */ = {isa = PBXBuildFile; fileRef = 17876B9C1C9911D40055DD15 /* g_icn_folder_sm.png */; };
17876BA11C9911D40055DD15 /* g_icn_folder_sm@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17876B9D1C9911D40055DD15 /* g_icn_folder_sm@2x.png */; };
17876BA41C99137B0055DD15 /* accessory_disclosure.png in Resources */ = {isa = PBXBuildFile; fileRef = 17876BA21C99137B0055DD15 /* accessory_disclosure.png */; };
17876BA51C99137B0055DD15 /* accessory_disclosure@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17876BA31C99137B0055DD15 /* accessory_disclosure@2x.png */; };
17BE5A721C5DDA8C0075F92C /* barbutton_sort_asc.png in Resources */ = {isa = PBXBuildFile; fileRef = 17BE5A6C1C5DDA8C0075F92C /* barbutton_sort_asc.png */; };
17BE5A731C5DDA8C0075F92C /* barbutton_sort_asc@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17BE5A6D1C5DDA8C0075F92C /* barbutton_sort_asc@2x.png */; };
17BE5A741C5DDA8C0075F92C /* barbutton_sort_asc@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17BE5A6E1C5DDA8C0075F92C /* barbutton_sort_asc@3x.png */; };
@ -569,6 +575,12 @@
1761295D1C630AEB00702FE4 /* mute_feed_off@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mute_feed_off@2x.png"; sourceTree = "<group>"; };
1761295E1C630AEB00702FE4 /* mute_feed_on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mute_feed_on.png; sourceTree = "<group>"; };
1761295F1C630AEB00702FE4 /* mute_feed_on@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mute_feed_on@2x.png"; sourceTree = "<group>"; };
17876B9A1C9911D40055DD15 /* g_icn_folder_rss_sm.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = g_icn_folder_rss_sm.png; sourceTree = "<group>"; };
17876B9B1C9911D40055DD15 /* g_icn_folder_rss_sm@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "g_icn_folder_rss_sm@2x.png"; sourceTree = "<group>"; };
17876B9C1C9911D40055DD15 /* g_icn_folder_sm.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = g_icn_folder_sm.png; sourceTree = "<group>"; };
17876B9D1C9911D40055DD15 /* g_icn_folder_sm@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "g_icn_folder_sm@2x.png"; sourceTree = "<group>"; };
17876BA21C99137B0055DD15 /* accessory_disclosure.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = accessory_disclosure.png; sourceTree = "<group>"; };
17876BA31C99137B0055DD15 /* accessory_disclosure@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "accessory_disclosure@2x.png"; sourceTree = "<group>"; };
17BE5A6C1C5DDA8C0075F92C /* barbutton_sort_asc.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = barbutton_sort_asc.png; sourceTree = "<group>"; };
17BE5A6D1C5DDA8C0075F92C /* barbutton_sort_asc@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "barbutton_sort_asc@2x.png"; sourceTree = "<group>"; };
17BE5A6E1C5DDA8C0075F92C /* barbutton_sort_asc@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "barbutton_sort_asc@3x.png"; sourceTree = "<group>"; };
@ -1610,6 +1622,8 @@
FFB705091925921F0052101C /* line_spacing_xs.png */,
FFCDD8F917F50C08000C6483 /* drag_icon.png */,
FF9F171518DCF3E000B75FC7 /* ios7_back_button@2x.png */,
17876BA21C99137B0055DD15 /* accessory_disclosure.png */,
17876BA31C99137B0055DD15 /* accessory_disclosure@2x.png */,
FFB9BE3F17F4B65B00FE0A36 /* logos */,
FFE816AC17E29D71008AF4B0 /* big_world_white.png */,
FFE816AA17E280BD008AF4B0 /* ftux_tree.png */,
@ -1750,8 +1764,12 @@
FFDD846F16E887D3000AA0A2 /* g_icn_folder_add@2x.png */,
FFDD847016E887D3000AA0A2 /* g_icn_folder_rss.png */,
FFDD847116E887D3000AA0A2 /* g_icn_folder_rss@2x.png */,
17876B9A1C9911D40055DD15 /* g_icn_folder_rss_sm.png */,
17876B9B1C9911D40055DD15 /* g_icn_folder_rss_sm@2x.png */,
FFDD847216E887D3000AA0A2 /* g_icn_folder.png */,
FFDD847316E887D3000AA0A2 /* g_icn_folder@2x.png */,
17876B9C1C9911D40055DD15 /* g_icn_folder_sm.png */,
17876B9D1C9911D40055DD15 /* g_icn_folder_sm@2x.png */,
FFDD847416E887D3000AA0A2 /* g_icn_hidden.png */,
FFDD847516E887D3000AA0A2 /* g_icn_hidden@2x.png */,
FFDD847616E887D3000AA0A2 /* g_icn_unread.png */,
@ -2449,6 +2467,7 @@
FF3A3E0D1BFBBB5E00ADC01A /* GothamNarrow-Book.otf in Resources */,
FF3A3E0E1BFBBB6100ADC01A /* GothamNarrow-BookItalic.otf in Resources */,
FF3A3E0F1BFBBB6400ADC01A /* GothamNarrow-Medium.otf in Resources */,
17876BA41C99137B0055DD15 /* accessory_disclosure.png in Resources */,
FF265F12187B6D4F0080C332 /* fitvid.js in Resources */,
FF67D3CC168A73380057A7DA /* storyDetailView.js in Resources */,
1740C6A31C1110BA005EA453 /* theme_color_sepia-sel@2x.png in Resources */,
@ -2613,6 +2632,7 @@
FF85BF7416D6A972002D334D /* ak-icon-allstories.png in Resources */,
FF85BF7516D6A972002D334D /* ak-icon-blurblogs.png in Resources */,
FF1660C816D6E9A700AF8541 /* DashboardViewController.xib in Resources */,
17876B9E1C9911D40055DD15 /* g_icn_folder_rss_sm.png in Resources */,
FF1660CA16D6E9B400AF8541 /* DashboardViewController~ipad.xib in Resources */,
FF3964BC192BED0A004BEE1A /* tag.png in Resources */,
FF29708B16DD7AA400E92F85 /* segment_active.png in Resources */,
@ -2642,6 +2662,7 @@
FFC5F30D16E2D2C2007AC72C /* story_share_appnet.png in Resources */,
FFC5F30E16E2D2C2007AC72C /* story_share_appnet@2x.png in Resources */,
1740C6A11C1110BA005EA453 /* theme_color_medium-sel@2x.png in Resources */,
17876BA01C9911D40055DD15 /* g_icn_folder_sm.png in Resources */,
17E635A91C5432220075338E /* barbutton_selection@3x.png in Resources */,
FFC5F30F16E2D2C2007AC72C /* story_share_facebook_active.png in Resources */,
FFC486B219CA416D00F4758F /* logo_57.png in Resources */,
@ -2707,6 +2728,7 @@
17C4954F1C14049A004805A7 /* logo_newsblur_blur-dark.png in Resources */,
FFDD846216E8871A000AA0A2 /* menu_icn_followers.png in Resources */,
FFDD846316E8871A000AA0A2 /* menu_icn_followers@2x.png in Resources */,
17876BA11C9911D40055DD15 /* g_icn_folder_sm@2x.png in Resources */,
FFDD846416E8871A000AA0A2 /* menu_icn_move.png in Resources */,
FFDD846516E8871A000AA0A2 /* menu_icn_move@2x.png in Resources */,
FFDD846616E8871A000AA0A2 /* menu_icn_train.png in Resources */,
@ -2714,6 +2736,7 @@
17E635A71C5432220075338E /* barbutton_selection.png in Resources */,
FFDD846A16E88722000AA0A2 /* clock.png in Resources */,
FFCDD8F417F4BCB4000C6483 /* Default-landscape.png in Resources */,
17876BA51C99137B0055DD15 /* accessory_disclosure@2x.png in Resources */,
FFDD846B16E88722000AA0A2 /* clock@2x.png in Resources */,
FFCDD8F717F4BCB4000C6483 /* Default-portrait@2x.png in Resources */,
FFDD847816E887D3000AA0A2 /* g_icn_focus.png in Resources */,
@ -2751,6 +2774,7 @@
FFB757FE1727098D001D132F /* menu_icn_mail.png in Resources */,
FFB757FF1727098D001D132F /* menu_icn_mail@2x.png in Resources */,
FFECD019172B105800D45A62 /* UIActivitySafari.png in Resources */,
17876B9F1C9911D40055DD15 /* g_icn_folder_rss_sm@2x.png in Resources */,
FFECD01A172B105800D45A62 /* UIActivitySafari@2x.png in Resources */,
FFB9BE4917F4B65B00FE0A36 /* logo_29.png in Resources */,
17CBD3C31BF6ED2C003FCCAE /* menu_icn_markread@2x.png in Resources */,

View file

@ -1,22 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15A282b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15E64a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AddSiteViewController">
<connections>
<outlet property="activityIndicator" destination="10" id="22"/>
<outlet property="addButton" destination="27" id="41"/>
<outlet property="addFolderButton" destination="67" id="69"/>
<outlet property="addFolderInput" destination="48" id="66"/>
<outlet property="addingLabel" destination="9" id="50"/>
<outlet property="cancelButton" destination="26" id="42"/>
<outlet property="errorLabel" destination="8" id="51"/>
<outlet property="folderPicker" destination="30" id="38"/>
<outlet property="inFolderInput" destination="36" id="39"/>
<outlet property="navBar" destination="24" id="46"/>
<outlet property="siteActivityIndicator" destination="61" id="62"/>
<outlet property="siteAddressInput" destination="47" id="57"/>
<outlet property="siteScrollView" destination="63" id="64"/>
@ -30,9 +26,8 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" text="Adding..." lineBreakMode="tailTruncation" minimumFontSize="10" id="9">
<rect key="frame" x="111" y="294" width="189" height="52"/>
<rect key="frame" x="111" y="250" width="189" height="52"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="17"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
@ -40,9 +35,8 @@
<size key="shadowOffset" width="0.0" height="1"/>
</label>
<label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" text="Error" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="4" minimumFontSize="17" id="8">
<rect key="frame" x="20" y="265" width="280" height="110"/>
<rect key="frame" x="20" y="221" width="280" height="110"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<animations/>
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="17"/>
<color key="textColor" red="0.92408370969999998" green="0.35912829639999999" blue="0.23267127570000001" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
@ -50,36 +44,12 @@
<size key="shadowOffset" width="0.0" height="1"/>
</label>
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" hidesWhenStopped="YES" style="gray" id="10">
<rect key="frame" x="87" y="310" width="20" height="20"/>
<rect key="frame" x="87" y="266" width="20" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
</activityIndicatorView>
<navigationBar contentMode="scaleToFill" translucent="NO" id="24">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<animations/>
<items>
<navigationItem id="25">
<barButtonItem key="leftBarButtonItem" title="Cancel" width="50" id="26">
<connections>
<action selector="doCancelButton" destination="-1" id="35"/>
</connections>
</barButtonItem>
<barButtonItem key="rightBarButtonItem" title="Add Site" style="done" id="27">
<connections>
<action selector="doAddButton" destination="-1" id="40"/>
</connections>
</barButtonItem>
</navigationItem>
</items>
<connections>
<outlet property="delegate" destination="-1" id="45"/>
</connections>
</navigationBar>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Choose a folder" minimumFontSize="17" id="36">
<rect key="frame" x="20" y="96" width="250" height="31"/>
<rect key="frame" x="20" y="52" width="250" height="31"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<animations/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" button="YES" image="YES"/>
</accessibility>
@ -91,9 +61,8 @@
</connections>
</textField>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Search by site title or address..." minimumFontSize="18" clearButtonMode="whileEditing" id="47">
<rect key="frame" x="20" y="57" width="280" height="31"/>
<rect key="frame" x="20" y="13" width="280" height="31"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<animations/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="12"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" keyboardType="emailAddress" returnKeyType="search" enablesReturnKeyAutomatically="YES"/>
@ -104,9 +73,8 @@
</connections>
</textField>
<textField opaque="NO" clipsSubviews="YES" alpha="0.0" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="New folder title" minimumFontSize="18" clearButtonMode="whileEditing" id="48">
<rect key="frame" x="20" y="135" width="280" height="31"/>
<rect key="frame" x="20" y="91" width="280" height="31"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<animations/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" name="Helvetica-Bold" family="Helvetica" pointSize="12"/>
<textInputTraits key="textInputTraits" autocapitalizationType="words" autocorrectionType="no" keyboardType="alphabet" returnKeyType="done" enablesReturnKeyAutomatically="YES"/>
@ -115,19 +83,17 @@
</connections>
</textField>
<activityIndicatorView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" hidesWhenStopped="YES" style="gray" id="61">
<rect key="frame" x="24" y="63" width="20" height="20"/>
<rect key="frame" x="24" y="19" width="20" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</activityIndicatorView>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" alpha="0.0" contentMode="scaleToFill" id="63">
<rect key="frame" x="0.0" y="135" width="320" height="345"/>
<rect key="frame" x="0.0" y="91" width="320" height="345"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="49">
<rect key="frame" x="0.0" y="0.0" width="320" height="345"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.59999999999999998" colorSpace="calibratedRGB"/>
<inset key="separatorInset" minX="6" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
@ -136,13 +102,11 @@
</connections>
</tableView>
</subviews>
<animations/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</scrollView>
<button opaque="NO" contentMode="center" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="67">
<rect key="frame" x="270" y="96" width="50" height="32"/>
<rect key="frame" x="270" y="52" width="50" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<animations/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<inset key="imageEdgeInsets" minX="8" minY="8" maxX="26" maxY="8"/>
<state key="normal" image="g_icn_folder_add.png">
@ -155,18 +119,9 @@
<action selector="toggleAddFolder:" destination="-1" eventType="touchUpInside" id="68"/>
</connections>
</button>
<pickerView contentMode="scaleToFill" id="30">
<rect key="frame" x="0.0" y="500" width="320" height="216"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<animations/>
<connections>
<outlet property="dataSource" destination="-1" id="33"/>
<outlet property="delegate" destination="-1" id="34"/>
</connections>
</pickerView>
</subviews>
<animations/>
<color key="backgroundColor" white="0.94625342150000002" alpha="1" colorSpace="calibratedWhite"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
</view>
</objects>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B