Massive refactor to fix all toolbar buttons so they extend to the edge.
|
@ -12,7 +12,6 @@
|
||||||
#import "BaseViewController.h"
|
#import "BaseViewController.h"
|
||||||
#import "Utilities.h"
|
#import "Utilities.h"
|
||||||
#import "WEPopoverController.h"
|
#import "WEPopoverController.h"
|
||||||
#import "TransparentToolbar.h"
|
|
||||||
#import "NBNotifier.h"
|
#import "NBNotifier.h"
|
||||||
#import "MCSwipeTableViewCell.h"
|
#import "MCSwipeTableViewCell.h"
|
||||||
|
|
||||||
|
@ -48,10 +47,8 @@
|
||||||
@property (nonatomic) IBOutlet UIBarButtonItem * settingsBarButton;
|
@property (nonatomic) IBOutlet UIBarButtonItem * settingsBarButton;
|
||||||
@property (nonatomic) IBOutlet UIBarButtonItem * spacerBarButton;
|
@property (nonatomic) IBOutlet UIBarButtonItem * spacerBarButton;
|
||||||
@property (nonatomic) IBOutlet UIBarButtonItem * spacer2BarButton;
|
@property (nonatomic) IBOutlet UIBarButtonItem * spacer2BarButton;
|
||||||
@property (nonatomic) IBOutlet UIBarButtonItem * spacer3BarButton;
|
|
||||||
@property (nonatomic) IBOutlet UIBarButtonItem * separatorBarButton;
|
@property (nonatomic) IBOutlet UIBarButtonItem * separatorBarButton;
|
||||||
@property (nonatomic) IBOutlet UIBarButtonItem * titleImageBarButton;
|
@property (nonatomic) IBOutlet UIBarButtonItem * titleImageBarButton;
|
||||||
@property (nonatomic) IBOutlet TransparentToolbar * rightToolbar;
|
|
||||||
@property (nonatomic, retain) WEPopoverController *popoverController;
|
@property (nonatomic, retain) WEPopoverController *popoverController;
|
||||||
@property (nonatomic, retain) NBNotifier *notifier;
|
@property (nonatomic, retain) NBNotifier *notifier;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#import "UIBarButtonItem+WEPopover.h"
|
#import "UIBarButtonItem+WEPopover.h"
|
||||||
#import "WEPopoverController.h"
|
#import "WEPopoverController.h"
|
||||||
#import "UIBarButtonItem+Image.h"
|
#import "UIBarButtonItem+Image.h"
|
||||||
#import "TransparentToolbar.h"
|
|
||||||
#import "FeedDetailMenuViewController.h"
|
#import "FeedDetailMenuViewController.h"
|
||||||
#import "NBNotifier.h"
|
#import "NBNotifier.h"
|
||||||
#import "NBLoadingCell.h"
|
#import "NBLoadingCell.h"
|
||||||
|
@ -51,8 +50,7 @@
|
||||||
@synthesize settingsBarButton;
|
@synthesize settingsBarButton;
|
||||||
@synthesize separatorBarButton;
|
@synthesize separatorBarButton;
|
||||||
@synthesize titleImageBarButton;
|
@synthesize titleImageBarButton;
|
||||||
@synthesize spacerBarButton, spacer2BarButton, spacer3BarButton;
|
@synthesize spacerBarButton, spacer2BarButton;
|
||||||
@synthesize rightToolbar;
|
|
||||||
@synthesize appDelegate;
|
@synthesize appDelegate;
|
||||||
@synthesize feedPage;
|
@synthesize feedPage;
|
||||||
@synthesize pageFetching;
|
@synthesize pageFetching;
|
||||||
|
@ -77,19 +75,12 @@
|
||||||
self.storyTitlesTable.backgroundColor = UIColorFromRGB(0xf4f4f4);
|
self.storyTitlesTable.backgroundColor = UIColorFromRGB(0xf4f4f4);
|
||||||
self.storyTitlesTable.separatorColor = UIColorFromRGB(0xE9E8E4);
|
self.storyTitlesTable.separatorColor = UIColorFromRGB(0xE9E8E4);
|
||||||
|
|
||||||
rightToolbar = [[TransparentToolbar alloc]
|
|
||||||
initWithFrame:CGRectMake(0, 0, 76, 44)];
|
|
||||||
rightToolbar.keepSpacing = YES;
|
|
||||||
|
|
||||||
spacerBarButton = [[UIBarButtonItem alloc]
|
spacerBarButton = [[UIBarButtonItem alloc]
|
||||||
initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
|
initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
|
||||||
spacerBarButton.width = -10;
|
spacerBarButton.width = 0;
|
||||||
spacer2BarButton = [[UIBarButtonItem alloc]
|
spacer2BarButton = [[UIBarButtonItem alloc]
|
||||||
initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
|
initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
|
||||||
spacer2BarButton.width = -10;
|
spacer2BarButton.width = 0;
|
||||||
spacer3BarButton = [[UIBarButtonItem alloc]
|
|
||||||
initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
|
|
||||||
spacer3BarButton.width = -6;
|
|
||||||
|
|
||||||
UIImage *separatorImage = [UIImage imageNamed:@"bar-separator.png"];
|
UIImage *separatorImage = [UIImage imageNamed:@"bar-separator.png"];
|
||||||
separatorBarButton = [UIBarButtonItem barItemWithImage:separatorImage target:nil action:nil];
|
separatorBarButton = [UIBarButtonItem barItemWithImage:separatorImage target:nil action:nil];
|
||||||
|
@ -131,7 +122,40 @@
|
||||||
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
|
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
|
||||||
[self setUserAvatarLayout:orientation];
|
[self setUserAvatarLayout:orientation];
|
||||||
self.finishedAnimatingIn = NO;
|
self.finishedAnimatingIn = NO;
|
||||||
[MBProgressHUD hideHUDForView:self.view animated:YES];
|
[MBProgressHUD hideHUDForView:self.view animated:NO];
|
||||||
|
|
||||||
|
// set right avatar title image
|
||||||
|
spacerBarButton.width = 0;
|
||||||
|
spacer2BarButton.width = 0;
|
||||||
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||||
|
spacerBarButton.width = -6;
|
||||||
|
spacer2BarButton.width = 10;
|
||||||
|
}
|
||||||
|
if (appDelegate.isSocialView) {
|
||||||
|
spacerBarButton.width = -6;
|
||||||
|
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [appDelegate.activeFeed objectForKey:@"id"]];
|
||||||
|
UIImage *titleImage = [Utilities getImage:feedIdStr isSocial:YES];
|
||||||
|
titleImage = [Utilities roundCorneredImage:titleImage radius:6];
|
||||||
|
[((UIButton *)titleImageBarButton.customView).imageView removeFromSuperview];
|
||||||
|
titleImageBarButton = [UIBarButtonItem barItemWithImage:titleImage
|
||||||
|
target:self
|
||||||
|
action:@selector(showUserProfile)];
|
||||||
|
titleImageBarButton.customView.frame = CGRectMake(0, 0, 32, 32);
|
||||||
|
self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:
|
||||||
|
spacerBarButton,
|
||||||
|
titleImageBarButton,
|
||||||
|
spacer2BarButton,
|
||||||
|
separatorBarButton,
|
||||||
|
feedMarkReadButton, nil];
|
||||||
|
} else {
|
||||||
|
self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:
|
||||||
|
spacerBarButton,
|
||||||
|
settingsBarButton,
|
||||||
|
spacer2BarButton,
|
||||||
|
separatorBarButton,
|
||||||
|
feedMarkReadButton,
|
||||||
|
nil];
|
||||||
|
}
|
||||||
|
|
||||||
// set center title
|
// set center title
|
||||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
||||||
|
@ -139,34 +163,8 @@
|
||||||
self.navigationItem.titleView = titleLabel;
|
self.navigationItem.titleView = titleLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set right avatar title image
|
|
||||||
if (appDelegate.isSocialView) {
|
|
||||||
NBBarButtonItem *titleImageButton = [appDelegate makeRightFeedTitle:appDelegate.activeFeed];
|
|
||||||
[titleImageButton addTarget:self action:@selector(showUserProfile) forControlEvents:UIControlEventTouchUpInside];
|
|
||||||
titleImageBarButton.customView = titleImageButton;
|
|
||||||
[rightToolbar setItems: [NSArray arrayWithObjects:
|
|
||||||
spacerBarButton,
|
|
||||||
feedMarkReadButton,
|
|
||||||
spacer2BarButton,
|
|
||||||
separatorBarButton,
|
|
||||||
spacer3BarButton,
|
|
||||||
titleImageBarButton, nil]];
|
|
||||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightToolbar];
|
|
||||||
titleImageBarButton.enabled = YES;
|
|
||||||
} else {
|
|
||||||
[rightToolbar setItems: [NSArray arrayWithObjects:
|
|
||||||
spacerBarButton,
|
|
||||||
feedMarkReadButton,
|
|
||||||
spacer2BarButton,
|
|
||||||
separatorBarButton,
|
|
||||||
spacer3BarButton,
|
|
||||||
settingsBarButton, nil]];
|
|
||||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightToolbar];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NSMutableArray *indexPaths = [NSMutableArray array];
|
NSMutableArray *indexPaths = [NSMutableArray array];
|
||||||
NSLog(@"appDelegate.recentlyReadStoryLocations: %d - %@", self.isOffline, appDelegate.recentlyReadStoryLocations);
|
// NSLog(@"appDelegate.recentlyReadStoryLocations: %d - %@", self.isOffline, appDelegate.recentlyReadStoryLocations);
|
||||||
for (id i in appDelegate.recentlyReadStoryLocations) {
|
for (id i in appDelegate.recentlyReadStoryLocations) {
|
||||||
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[i intValue]
|
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[i intValue]
|
||||||
inSection:0];
|
inSection:0];
|
||||||
|
@ -185,8 +183,6 @@
|
||||||
appDelegate.recentlyReadStoryLocations = [NSMutableArray array];
|
appDelegate.recentlyReadStoryLocations = [NSMutableArray array];
|
||||||
appDelegate.originalStoryCount = [appDelegate unreadCount];
|
appDelegate.originalStoryCount = [appDelegate unreadCount];
|
||||||
|
|
||||||
[super viewWillAppear:animated];
|
|
||||||
|
|
||||||
if ((appDelegate.isSocialRiverView ||
|
if ((appDelegate.isSocialRiverView ||
|
||||||
appDelegate.isSocialView ||
|
appDelegate.isSocialView ||
|
||||||
[appDelegate.activeFolder isEqualToString:@"saved_stories"])) {
|
[appDelegate.activeFolder isEqualToString:@"saved_stories"])) {
|
||||||
|
@ -220,7 +216,6 @@
|
||||||
[super viewDidAppear:animated];
|
[super viewDidAppear:animated];
|
||||||
if (appDelegate.inStoryDetail && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
if (appDelegate.inStoryDetail && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
||||||
appDelegate.inStoryDetail = NO;
|
appDelegate.inStoryDetail = NO;
|
||||||
[appDelegate.storyPageControl resetPages];
|
|
||||||
[self checkScroll];
|
[self checkScroll];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1463,7 +1458,7 @@
|
||||||
- (void)showUserProfile {
|
- (void)showUserProfile {
|
||||||
appDelegate.activeUserProfileId = [NSString stringWithFormat:@"%@", [appDelegate.activeFeed objectForKey:@"user_id"]];
|
appDelegate.activeUserProfileId = [NSString stringWithFormat:@"%@", [appDelegate.activeFeed objectForKey:@"user_id"]];
|
||||||
appDelegate.activeUserProfileName = [NSString stringWithFormat:@"%@", [appDelegate.activeFeed objectForKey:@"username"]];
|
appDelegate.activeUserProfileName = [NSString stringWithFormat:@"%@", [appDelegate.activeFeed objectForKey:@"username"]];
|
||||||
[appDelegate showUserProfileModal:self.navigationItem.rightBarButtonItem];
|
[appDelegate showUserProfileModal:titleImageBarButton];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)changeActiveFeedDetailRow {
|
- (void)changeActiveFeedDetailRow {
|
||||||
|
|
|
@ -86,16 +86,16 @@
|
||||||
CGContextSetStrokeColor(context, CGColorGetComponents([topColor CGColor]));
|
CGContextSetStrokeColor(context, CGColorGetComponents([topColor CGColor]));
|
||||||
|
|
||||||
CGContextBeginPath(context);
|
CGContextBeginPath(context);
|
||||||
CGContextMoveToPoint(context, 0, 0.5f);
|
CGContextMoveToPoint(context, 0, 0.25f);
|
||||||
CGContextAddLineToPoint(context, rect.size.width, 0.5f);
|
CGContextAddLineToPoint(context, rect.size.width, 0.25f);
|
||||||
CGContextStrokePath(context);
|
CGContextStrokePath(context);
|
||||||
|
|
||||||
// bottom border
|
// bottom border
|
||||||
UIColor *bottomColor = UIColorFromRGB(0xB7BBAA);
|
UIColor *bottomColor = UIColorFromRGB(0xB7BBAA);
|
||||||
CGContextSetStrokeColor(context, CGColorGetComponents([bottomColor CGColor]));
|
CGContextSetStrokeColor(context, CGColorGetComponents([bottomColor CGColor]));
|
||||||
CGContextBeginPath(context);
|
CGContextBeginPath(context);
|
||||||
CGContextMoveToPoint(context, 0, rect.size.height - .5f);
|
CGContextMoveToPoint(context, 0, rect.size.height-0.25f);
|
||||||
CGContextAddLineToPoint(context, rect.size.width, rect.size.height - .5f);
|
CGContextAddLineToPoint(context, rect.size.width, rect.size.height-0.25f);
|
||||||
CGContextStrokePath(context);
|
CGContextStrokePath(context);
|
||||||
|
|
||||||
// Folder title
|
// Folder title
|
||||||
|
|
|
@ -48,6 +48,11 @@
|
||||||
self.emailInput.borderStyle = UITextBorderStyleRoundedRect;
|
self.emailInput.borderStyle = UITextBorderStyleRoundedRect;
|
||||||
self.signUpPasswordInput.borderStyle = UITextBorderStyleRoundedRect;
|
self.signUpPasswordInput.borderStyle = UITextBorderStyleRoundedRect;
|
||||||
self.signUpUsernameInput.borderStyle = UITextBorderStyleRoundedRect;
|
self.signUpUsernameInput.borderStyle = UITextBorderStyleRoundedRect;
|
||||||
|
[self.loginControl
|
||||||
|
setTitleTextAttributes:@{NSFontAttributeName:
|
||||||
|
[UIFont fontWithName:@"Helvetica-Bold" size:11.0f]}
|
||||||
|
forState:UIControlStateNormal];
|
||||||
|
|
||||||
|
|
||||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||||
if (UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) {
|
if (UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) {
|
||||||
|
@ -218,6 +223,7 @@
|
||||||
[self.passwordInput setText:@""];
|
[self.passwordInput setText:@""];
|
||||||
[self.signUpPasswordInput setText:@""];
|
[self.signUpPasswordInput setText:@""];
|
||||||
[appDelegate reloadFeedsView:YES];
|
[appDelegate reloadFeedsView:YES];
|
||||||
|
[self dismissViewControllerAnimated:YES completion:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -278,7 +284,7 @@
|
||||||
[self.signUpPasswordInput setText:@""];
|
[self.signUpPasswordInput setText:@""];
|
||||||
// [appDelegate showFirstTimeUser];
|
// [appDelegate showFirstTimeUser];
|
||||||
[appDelegate reloadFeedsView:YES];
|
[appDelegate reloadFeedsView:YES];
|
||||||
[self dismissViewControllerAnimated:NO completion:nil];
|
[self dismissViewControllerAnimated:YES completion:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -506,7 +506,7 @@
|
||||||
self.storyPageControl.nextPage.webView.hidden = YES;
|
self.storyPageControl.nextPage.webView.hidden = YES;
|
||||||
self.storyPageControl.bottomSize.hidden = NO;
|
self.storyPageControl.bottomSize.hidden = NO;
|
||||||
self.storyPageControl.navigationItem.rightBarButtonItems = nil;
|
self.storyPageControl.navigationItem.rightBarButtonItems = nil;
|
||||||
[self.storyPageControl resetPages];
|
[self.storyPageControl hidePages];
|
||||||
NSInteger unreadCount = appDelegate.unreadCount;
|
NSInteger unreadCount = appDelegate.unreadCount;
|
||||||
if (unreadCount == 0) {
|
if (unreadCount == 0) {
|
||||||
self.storyPageControl.circularProgressView.percentage = 1;
|
self.storyPageControl.circularProgressView.percentage = 1;
|
||||||
|
@ -521,8 +521,7 @@
|
||||||
if (UIInterfaceOrientationIsPortrait(orientation) && !self.storyTitlesOnLeft) {
|
if (UIInterfaceOrientationIsPortrait(orientation) && !self.storyTitlesOnLeft) {
|
||||||
// CASE: story titles on bottom
|
// CASE: story titles on bottom
|
||||||
self.storyPageControl.navigationItem.leftBarButtonItem = self.storyPageControl.buttonBack;
|
self.storyPageControl.navigationItem.leftBarButtonItem = self.storyPageControl.buttonBack;
|
||||||
self.storyPageControl.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
|
self.storyPageControl.navigationItem.rightBarButtonItems = self.feedDetailViewController.navigationItem.rightBarButtonItems;
|
||||||
initWithCustomView:self.feedDetailViewController.rightToolbar];
|
|
||||||
|
|
||||||
self.storyNavigationController.view.frame = CGRectMake(vb.size.width, 0, vb.size.width, storyTitlesYCoordinate);
|
self.storyNavigationController.view.frame = CGRectMake(vb.size.width, 0, vb.size.width, storyTitlesYCoordinate);
|
||||||
self.feedDetailViewController.view.frame = CGRectMake(vb.size.width,
|
self.feedDetailViewController.view.frame = CGRectMake(vb.size.width,
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#import "BaseViewController.h"
|
#import "BaseViewController.h"
|
||||||
#import "FMDatabaseQueue.h"
|
#import "FMDatabaseQueue.h"
|
||||||
#import "NBBarButtonItem.h"
|
|
||||||
|
|
||||||
#define FEED_DETAIL_VIEW_TAG 1000001
|
#define FEED_DETAIL_VIEW_TAG 1000001
|
||||||
#define STORY_DETAIL_VIEW_TAG 1000002
|
#define STORY_DETAIL_VIEW_TAG 1000002
|
||||||
|
@ -353,7 +352,6 @@
|
||||||
+ (UIView *)makeGradientView:(CGRect)rect startColor:(NSString *)start endColor:(NSString *)end;
|
+ (UIView *)makeGradientView:(CGRect)rect startColor:(NSString *)start endColor:(NSString *)end;
|
||||||
- (UIView *)makeFeedTitleGradient:(NSDictionary *)feed withRect:(CGRect)rect;
|
- (UIView *)makeFeedTitleGradient:(NSDictionary *)feed withRect:(CGRect)rect;
|
||||||
- (UIView *)makeFeedTitle:(NSDictionary *)feed;
|
- (UIView *)makeFeedTitle:(NSDictionary *)feed;
|
||||||
- (NBBarButtonItem *)makeRightFeedTitle:(NSDictionary *)feed;
|
|
||||||
|
|
||||||
- (void)toggleAuthorClassifier:(NSString *)author feedId:(NSString *)feedId;
|
- (void)toggleAuthorClassifier:(NSString *)author feedId:(NSString *)feedId;
|
||||||
- (void)toggleTagClassifier:(NSString *)tag feedId:(NSString *)feedId;
|
- (void)toggleTagClassifier:(NSString *)tag feedId:(NSString *)feedId;
|
||||||
|
|
|
@ -193,7 +193,7 @@
|
||||||
// [[UISegmentedControl appearance] setBackgroundColor:UIColorFromRGB(0x8F918B)];
|
// [[UISegmentedControl appearance] setBackgroundColor:UIColorFromRGB(0x8F918B)];
|
||||||
|
|
||||||
[self createDatabaseConnection];
|
[self createDatabaseConnection];
|
||||||
[self.feedsViewController fetchFeedList:YES];
|
[self.feedsViewController loadOfflineFeeds:NO];
|
||||||
|
|
||||||
[[PocketAPI sharedAPI] setConsumerKey:@"16638-05adf4465390446398e53b8b"];
|
[[PocketAPI sharedAPI] setConsumerKey:@"16638-05adf4465390446398e53b8b"];
|
||||||
|
|
||||||
|
@ -605,7 +605,6 @@
|
||||||
|
|
||||||
- (void)reloadFeedsView:(BOOL)showLoader {
|
- (void)reloadFeedsView:(BOOL)showLoader {
|
||||||
[feedsViewController fetchFeedList:showLoader];
|
[feedsViewController fetchFeedList:showLoader];
|
||||||
[loginViewController dismissViewControllerAnimated:NO completion:nil];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)loadFeedDetailView {
|
- (void)loadFeedDetailView {
|
||||||
|
@ -2190,8 +2189,6 @@
|
||||||
titleLabel.shadowColor = UIColorFromRGB(0xF0F0F0);
|
titleLabel.shadowColor = UIColorFromRGB(0xF0F0F0);
|
||||||
titleLabel.shadowOffset = CGSizeMake(0, 1);
|
titleLabel.shadowOffset = CGSizeMake(0, 1);
|
||||||
titleLabel.center = CGPointMake(0, -2);
|
titleLabel.center = CGPointMake(0, -2);
|
||||||
[titleLabel sizeToFit];
|
|
||||||
|
|
||||||
if (!self.isSocialView) {
|
if (!self.isSocialView) {
|
||||||
titleLabel.center = CGPointMake(28, -2);
|
titleLabel.center = CGPointMake(28, -2);
|
||||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [feed objectForKey:@"id"]];
|
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [feed objectForKey:@"id"]];
|
||||||
|
@ -2213,23 +2210,11 @@
|
||||||
titleImageView.frame = CGRectMake(0.0, 2.0, 16.0, 16.0);
|
titleImageView.frame = CGRectMake(0.0, 2.0, 16.0, 16.0);
|
||||||
[titleLabel addSubview:titleImageView];
|
[titleLabel addSubview:titleImageView];
|
||||||
}
|
}
|
||||||
|
[titleLabel sizeToFit];
|
||||||
|
|
||||||
return titleLabel;
|
return titleLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NBBarButtonItem *)makeRightFeedTitle:(NSDictionary *)feed {
|
|
||||||
|
|
||||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [feed objectForKey:@"id"]];
|
|
||||||
UIImage *titleImage = [Utilities getImage:feedIdStr];
|
|
||||||
|
|
||||||
titleImage = [Utilities roundCorneredImage:titleImage radius:6];
|
|
||||||
|
|
||||||
NBBarButtonItem *titleImageButton = [NBBarButtonItem buttonWithType:UIButtonTypeCustom];
|
|
||||||
titleImageButton.bounds = CGRectMake(0, 0, 32, 32);
|
|
||||||
|
|
||||||
[titleImageButton setImage:titleImage forState:UIControlStateNormal];
|
|
||||||
return titleImageButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
#pragma mark Classifiers
|
#pragma mark Classifiers
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#import "NBNotifier.h"
|
#import "NBNotifier.h"
|
||||||
#import "Utilities.h"
|
#import "Utilities.h"
|
||||||
#import "UIBarButtonItem+WEPopover.h"
|
#import "UIBarButtonItem+WEPopover.h"
|
||||||
|
#import "UIBarButtonItem+Image.h"
|
||||||
#import "AddSiteViewController.h"
|
#import "AddSiteViewController.h"
|
||||||
#import "FMDatabase.h"
|
#import "FMDatabase.h"
|
||||||
#import "FMDatabaseAdditions.h"
|
#import "FMDatabaseAdditions.h"
|
||||||
|
@ -287,7 +288,7 @@ static const CGFloat kFolderTitleHeight = 28.0f;
|
||||||
NSDate *decayDate = [[NSDate alloc] initWithTimeIntervalSinceNow:(BACKGROUND_REFRESH_SECONDS)];
|
NSDate *decayDate = [[NSDate alloc] initWithTimeIntervalSinceNow:(BACKGROUND_REFRESH_SECONDS)];
|
||||||
NSLog(@"Last Update: %@ - %f", self.lastUpdate, [self.lastUpdate timeIntervalSinceDate:decayDate]);
|
NSLog(@"Last Update: %@ - %f", self.lastUpdate, [self.lastUpdate timeIntervalSinceDate:decayDate]);
|
||||||
if ([self.lastUpdate timeIntervalSinceDate:decayDate] < 0) {
|
if ([self.lastUpdate timeIntervalSinceDate:decayDate] < 0) {
|
||||||
[self fetchFeedList:YES];
|
[appDelegate reloadFeedsView:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -320,8 +321,6 @@ static const CGFloat kFolderTitleHeight = 28.0f;
|
||||||
|
|
||||||
self.lastUpdate = [NSDate date];
|
self.lastUpdate = [NSDate date];
|
||||||
[self showRefreshNotifier];
|
[self showRefreshNotifier];
|
||||||
|
|
||||||
[self loadOfflineFeeds:NO];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)finishedWithError:(ASIHTTPRequest *)request {
|
- (void)finishedWithError:(ASIHTTPRequest *)request {
|
||||||
|
@ -332,7 +331,6 @@ static const CGFloat kFolderTitleHeight = 28.0f;
|
||||||
[self informError:[request error]];
|
[self informError:[request error]];
|
||||||
self.inPullToRefresh_ = NO;
|
self.inPullToRefresh_ = NO;
|
||||||
|
|
||||||
[self loadOfflineFeeds:YES];
|
|
||||||
[self showOfflineNotifier];
|
[self showOfflineNotifier];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,7 +348,6 @@ static const CGFloat kFolderTitleHeight = 28.0f;
|
||||||
[self informError:@"The server barfed!"];
|
[self informError:@"The server barfed!"];
|
||||||
}
|
}
|
||||||
|
|
||||||
[self loadOfflineFeeds:YES];
|
|
||||||
[self showOfflineNotifier];
|
[self showOfflineNotifier];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -483,6 +480,7 @@ static const CGFloat kFolderTitleHeight = 28.0f;
|
||||||
forKey:userKey];
|
forKey:userKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NSLog(@"Setting dictSocialFeeds");
|
||||||
appDelegate.dictSocialFeeds = socialDict;
|
appDelegate.dictSocialFeeds = socialDict;
|
||||||
[self loadAvatars];
|
[self loadAvatars];
|
||||||
|
|
||||||
|
@ -660,8 +658,12 @@ static const CGFloat kFolderTitleHeight = 28.0f;
|
||||||
[cursor close];
|
[cursor close];
|
||||||
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
if (![[results allKeys] count] && !failed) return;
|
if (![[results allKeys] count] && !failed) {
|
||||||
|
NSLog(@"Fetched feeds before offline came in. Skipping offline loading.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
[_self finishLoadingFeedListWithDict:results];
|
[_self finishLoadingFeedListWithDict:results];
|
||||||
|
[_self fetchFeedList:NO];
|
||||||
});
|
});
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
@ -670,7 +672,8 @@ static const CGFloat kFolderTitleHeight = 28.0f;
|
||||||
appDelegate.activeUserProfileId = [NSString stringWithFormat:@"%@", [appDelegate.dictSocialProfile objectForKey:@"user_id"]];
|
appDelegate.activeUserProfileId = [NSString stringWithFormat:@"%@", [appDelegate.dictSocialProfile objectForKey:@"user_id"]];
|
||||||
appDelegate.activeUserProfileName = [NSString stringWithFormat:@"%@", [appDelegate.dictSocialProfile objectForKey:@"username"]];
|
appDelegate.activeUserProfileName = [NSString stringWithFormat:@"%@", [appDelegate.dictSocialProfile objectForKey:@"username"]];
|
||||||
// appDelegate.activeUserProfileName = @"You";
|
// appDelegate.activeUserProfileName = @"You";
|
||||||
[appDelegate showUserProfileModal:self.navigationItem.leftBarButtonItem];
|
[appDelegate showUserProfileModal:[self.navigationItem.leftBarButtonItems
|
||||||
|
objectAtIndex:1]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)tapAddSite:(id)sender {
|
- (IBAction)tapAddSite:(id)sender {
|
||||||
|
@ -1532,7 +1535,7 @@ heightForHeaderInSection:(NSInteger)section {
|
||||||
// called when the user pulls-to-refresh
|
// called when the user pulls-to-refresh
|
||||||
- (void)pullToRefreshViewShouldRefresh:(PullToRefreshView *)view {
|
- (void)pullToRefreshViewShouldRefresh:(PullToRefreshView *)view {
|
||||||
self.inPullToRefresh_ = YES;
|
self.inPullToRefresh_ = YES;
|
||||||
[self fetchFeedList:NO];
|
[appDelegate reloadFeedsView:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)refreshFeedList {
|
- (void)refreshFeedList {
|
||||||
|
@ -1744,36 +1747,36 @@ heightForHeaderInSection:(NSInteger)section {
|
||||||
NSURL *imageURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@",
|
NSURL *imageURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@",
|
||||||
[appDelegate.dictSocialProfile
|
[appDelegate.dictSocialProfile
|
||||||
objectForKey:@"photo_url"]]];
|
objectForKey:@"photo_url"]]];
|
||||||
NBBarButtonItem *userAvatarButton = [NBBarButtonItem buttonWithType:UIButtonTypeCustom];
|
UIBarButtonItem *userAvatarButton = [UIBarButtonItem barItemWithImage:[UIImage alloc]
|
||||||
userAvatarButton.frame = CGRectMake(0, yOffset + 1, isShort ? 28 : 32, isShort ? 28 : 32);
|
target:self
|
||||||
[userAvatarButton addTarget:self action:@selector(showUserProfile) forControlEvents:UIControlEventTouchUpInside];
|
action:@selector(showUserProfile)];
|
||||||
|
userAvatarButton.customView.frame = CGRectMake(0, yOffset + 1, isShort ? 28 : 32, isShort ? 28 : 32);
|
||||||
|
|
||||||
NSMutableURLRequest *avatarRequest = [NSMutableURLRequest requestWithURL:imageURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:30.0];
|
NSMutableURLRequest *avatarRequest = [NSMutableURLRequest requestWithURL:imageURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:30.0];
|
||||||
[avatarRequest setHTTPShouldHandleCookies:NO];
|
[avatarRequest setHTTPShouldHandleCookies:NO];
|
||||||
[avatarRequest setHTTPShouldUsePipelining:YES];
|
[avatarRequest setHTTPShouldUsePipelining:YES];
|
||||||
UIImageView *avatarImageView = [[UIImageView alloc] initWithFrame:userAvatarButton.frame];
|
UIImageView *avatarImageView = [[UIImageView alloc] initWithFrame:userAvatarButton.customView.frame];
|
||||||
[avatarImageView setImageWithURLRequest:avatarRequest placeholderImage:nil success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) {
|
[avatarImageView setImageWithURLRequest:avatarRequest placeholderImage:nil success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) {
|
||||||
image = [Utilities roundCorneredImage:image radius:3];
|
image = [Utilities roundCorneredImage:image radius:3];
|
||||||
[userAvatarButton setImage:image forState:UIControlStateNormal];
|
[(UIButton *)userAvatarButton.customView setImage:image forState:UIControlStateNormal];
|
||||||
} failure:nil];
|
} failure:nil];
|
||||||
// self.navigationItem.leftBarButtonItem = userInfoBarButton;
|
// self.navigationItem.leftBarButtonItem = userInfoBarButton;
|
||||||
|
|
||||||
[userInfoView addSubview:userAvatarButton];
|
// [userInfoView addSubview:userAvatarButton];
|
||||||
|
|
||||||
int xOffset = CGRectGetMaxX(userAvatarButton.frame) + 6;
|
UILabel *userLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, yOffset, userInfoView.frame.size.width, 16)];
|
||||||
|
|
||||||
UILabel *userLabel = [[UILabel alloc] initWithFrame:CGRectMake(xOffset, yOffset, userInfoView.frame.size.width, 16)];
|
|
||||||
userLabel.text = appDelegate.activeUsername;
|
userLabel.text = appDelegate.activeUsername;
|
||||||
userLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:14.0];
|
userLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:14.0];
|
||||||
userLabel.textColor = UIColorFromRGB(0x404040);
|
userLabel.textColor = UIColorFromRGB(0x404040);
|
||||||
userLabel.backgroundColor = [UIColor clearColor];
|
userLabel.backgroundColor = [UIColor clearColor];
|
||||||
userLabel.shadowColor = UIColorFromRGB(0xFAFAFA);
|
userLabel.shadowColor = UIColorFromRGB(0xFAFAFA);
|
||||||
|
[userLabel sizeToFit];
|
||||||
[userInfoView addSubview:userLabel];
|
[userInfoView addSubview:userLabel];
|
||||||
|
|
||||||
[appDelegate.folderCountCache removeObjectForKey:@"everything"];
|
[appDelegate.folderCountCache removeObjectForKey:@"everything"];
|
||||||
UnreadCounts *counts = [appDelegate splitUnreadCountForFolder:@"everything"];
|
UnreadCounts *counts = [appDelegate splitUnreadCountForFolder:@"everything"];
|
||||||
UIImageView *yellow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"g_icn_unread"]];
|
UIImageView *yellow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"g_icn_unread"]];
|
||||||
yellow.frame = CGRectMake(xOffset, userLabel.frame.origin.y + userLabel.frame.size.height + 4, 8, 8);
|
yellow.frame = CGRectMake(0, userLabel.frame.origin.y + userLabel.frame.size.height + 4, 8, 8);
|
||||||
[userInfoView addSubview:yellow];
|
[userInfoView addSubview:yellow];
|
||||||
|
|
||||||
NSNumberFormatter *formatter = [NSNumberFormatter new];
|
NSNumberFormatter *formatter = [NSNumberFormatter new];
|
||||||
|
@ -1804,11 +1807,19 @@ heightForHeaderInSection:(NSInteger)section {
|
||||||
[positiveCount sizeToFit];
|
[positiveCount sizeToFit];
|
||||||
[userInfoView addSubview:positiveCount];
|
[userInfoView addSubview:positiveCount];
|
||||||
|
|
||||||
[userInfoView setBounds:CGRectInset(userInfoView.bounds, 10, 0)];
|
[userInfoView sizeToFit];
|
||||||
|
|
||||||
UIBarButtonItem *userInfoBarButton = [[UIBarButtonItem alloc]
|
UIBarButtonItem *userInfoBarButton = [[UIBarButtonItem alloc]
|
||||||
initWithCustomView:userInfoView];
|
initWithCustomView:userInfoView];
|
||||||
self.navigationItem.leftBarButtonItem = userInfoBarButton;
|
UIBarButtonItem *spacer = [[UIBarButtonItem alloc]
|
||||||
|
initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace
|
||||||
|
target:nil
|
||||||
|
action:nil];
|
||||||
|
spacer.width = -8;
|
||||||
|
self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:
|
||||||
|
spacer,
|
||||||
|
userAvatarButton,
|
||||||
|
userInfoBarButton, nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)showRefreshNotifier {
|
- (void)showRefreshNotifier {
|
||||||
|
|
|
@ -70,6 +70,7 @@
|
||||||
[self.webView.scrollView addObserver:self forKeyPath:@"contentOffset"
|
[self.webView.scrollView addObserver:self forKeyPath:@"contentOffset"
|
||||||
options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld
|
options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld
|
||||||
context:nil];
|
context:nil];
|
||||||
|
|
||||||
self.pageIndex = -2;
|
self.pageIndex = -2;
|
||||||
self.inTextView = NO;
|
self.inTextView = NO;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#import "BaseViewController.h"
|
#import "BaseViewController.h"
|
||||||
#import "NewsBlurAppDelegate.h"
|
#import "NewsBlurAppDelegate.h"
|
||||||
#import "WEPopoverController.h"
|
#import "WEPopoverController.h"
|
||||||
#import "TransparentToolbar.h"
|
|
||||||
#import "THCircularProgressView.h"
|
#import "THCircularProgressView.h"
|
||||||
|
|
||||||
@class NewsBlurAppDelegate;
|
@class NewsBlurAppDelegate;
|
||||||
|
@ -27,7 +26,6 @@
|
||||||
UIButton *buttonText;
|
UIButton *buttonText;
|
||||||
UIActivityIndicatorView *loadingIndicator;
|
UIActivityIndicatorView *loadingIndicator;
|
||||||
UIBarButtonItem *buttonBack;
|
UIBarButtonItem *buttonBack;
|
||||||
TransparentToolbar * rightToolbar;
|
|
||||||
UIView *traverseView;
|
UIView *traverseView;
|
||||||
UIView *progressView;
|
UIView *progressView;
|
||||||
UIView *progressViewContainer;
|
UIView *progressViewContainer;
|
||||||
|
@ -60,7 +58,6 @@
|
||||||
@property (nonatomic) IBOutlet UIBarButtonItem * spacer2BarButton;
|
@property (nonatomic) IBOutlet UIBarButtonItem * spacer2BarButton;
|
||||||
@property (nonatomic) IBOutlet UIBarButtonItem * spacer3BarButton;
|
@property (nonatomic) IBOutlet UIBarButtonItem * spacer3BarButton;
|
||||||
@property (nonatomic) IBOutlet UIBarButtonItem * separatorBarButton;
|
@property (nonatomic) IBOutlet UIBarButtonItem * separatorBarButton;
|
||||||
@property (nonatomic) IBOutlet TransparentToolbar * rightToolbar;
|
|
||||||
@property (nonatomic) IBOutlet UIView *traverseView;
|
@property (nonatomic) IBOutlet UIView *traverseView;
|
||||||
@property (nonatomic) IBOutlet UIView *progressView;
|
@property (nonatomic) IBOutlet UIView *progressView;
|
||||||
@property (nonatomic) IBOutlet UIView *progressViewContainer;
|
@property (nonatomic) IBOutlet UIView *progressViewContainer;
|
||||||
|
@ -84,6 +81,7 @@
|
||||||
|
|
||||||
- (void)transitionFromFeedDetail;
|
- (void)transitionFromFeedDetail;
|
||||||
- (void)resetPages;
|
- (void)resetPages;
|
||||||
|
- (void)hidePages;
|
||||||
- (void)refreshPages;
|
- (void)refreshPages;
|
||||||
- (void)refreshHeaders;
|
- (void)refreshHeaders;
|
||||||
- (void)setStoryFromScroll;
|
- (void)setStoryFromScroll;
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
#import "NBContainerViewController.h"
|
#import "NBContainerViewController.h"
|
||||||
#import "DataUtilities.h"
|
#import "DataUtilities.h"
|
||||||
#import "JSON.h"
|
#import "JSON.h"
|
||||||
#import "TransparentToolbar.h"
|
|
||||||
#import "UIBarButtonItem+Image.h"
|
#import "UIBarButtonItem+Image.h"
|
||||||
#import "THCircularProgressView.h"
|
#import "THCircularProgressView.h"
|
||||||
#import "FMDatabase.h"
|
#import "FMDatabase.h"
|
||||||
|
@ -35,7 +34,6 @@
|
||||||
@synthesize circularProgressView;
|
@synthesize circularProgressView;
|
||||||
@synthesize separatorBarButton;
|
@synthesize separatorBarButton;
|
||||||
@synthesize spacerBarButton, spacer2BarButton, spacer3BarButton;
|
@synthesize spacerBarButton, spacer2BarButton, spacer3BarButton;
|
||||||
@synthesize rightToolbar;
|
|
||||||
@synthesize buttonPrevious;
|
@synthesize buttonPrevious;
|
||||||
@synthesize buttonNext;
|
@synthesize buttonNext;
|
||||||
@synthesize buttonAction;
|
@synthesize buttonAction;
|
||||||
|
@ -122,9 +120,6 @@
|
||||||
[self.traverseView insertSubview:tapIndicator aboveSubview:circularProgressView];
|
[self.traverseView insertSubview:tapIndicator aboveSubview:circularProgressView];
|
||||||
self.loadingIndicator.frame = self.circularProgressView.frame;
|
self.loadingIndicator.frame = self.circularProgressView.frame;
|
||||||
|
|
||||||
rightToolbar = [[TransparentToolbar alloc]
|
|
||||||
initWithFrame:CGRectMake(0, 0, 86, 44)];
|
|
||||||
|
|
||||||
spacerBarButton = [[UIBarButtonItem alloc]
|
spacerBarButton = [[UIBarButtonItem alloc]
|
||||||
initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace
|
initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace
|
||||||
target:nil action:nil];
|
target:nil action:nil];
|
||||||
|
@ -173,15 +168,10 @@
|
||||||
|
|
||||||
|
|
||||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
||||||
[rightToolbar setItems: [NSArray arrayWithObjects:
|
self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:
|
||||||
spacerBarButton,
|
originalStoryButton,
|
||||||
fontSettingsButton,
|
|
||||||
spacer2BarButton,
|
|
||||||
separatorBarButton,
|
separatorBarButton,
|
||||||
spacer3BarButton,
|
fontSettingsButton, nil];
|
||||||
originalStoryButton, nil]];
|
|
||||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
|
|
||||||
initWithCustomView:rightToolbar];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[self.scrollView addObserver:self forKeyPath:@"contentOffset"
|
[self.scrollView addObserver:self forKeyPath:@"contentOffset"
|
||||||
|
@ -194,6 +184,7 @@
|
||||||
- (void)viewWillAppear:(BOOL)animated {
|
- (void)viewWillAppear:(BOOL)animated {
|
||||||
[self setNextPreviousButtons];
|
[self setNextPreviousButtons];
|
||||||
[appDelegate adjustStoryDetailWebView];
|
[appDelegate adjustStoryDetailWebView];
|
||||||
|
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
|
||||||
|
|
||||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
||||||
if (!appDelegate.isSocialView) {
|
if (!appDelegate.isSocialView) {
|
||||||
|
@ -264,6 +255,8 @@
|
||||||
|
|
||||||
- (void)viewWillDisappear:(BOOL)animated {
|
- (void)viewWillDisappear:(BOOL)animated {
|
||||||
previousPage.view.hidden = YES;
|
previousPage.view.hidden = YES;
|
||||||
|
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)transitionFromFeedDetail {
|
- (void)transitionFromFeedDetail {
|
||||||
|
@ -339,10 +332,6 @@
|
||||||
[nextPage clearStory];
|
[nextPage clearStory];
|
||||||
[previousPage clearStory];
|
[previousPage clearStory];
|
||||||
|
|
||||||
[currentPage hideStory];
|
|
||||||
[nextPage hideStory];
|
|
||||||
[previousPage hideStory];
|
|
||||||
|
|
||||||
CGRect frame = self.scrollView.frame;
|
CGRect frame = self.scrollView.frame;
|
||||||
self.scrollView.contentSize = frame.size;
|
self.scrollView.contentSize = frame.size;
|
||||||
|
|
||||||
|
@ -354,7 +343,12 @@
|
||||||
currentPage.pageIndex = -2;
|
currentPage.pageIndex = -2;
|
||||||
nextPage.pageIndex = -2;
|
nextPage.pageIndex = -2;
|
||||||
previousPage.pageIndex = -2;
|
previousPage.pageIndex = -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)hidePages {
|
||||||
|
[currentPage hideStory];
|
||||||
|
[nextPage hideStory];
|
||||||
|
[previousPage hideStory];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)refreshPages {
|
- (void)refreshPages {
|
||||||
|
@ -695,14 +689,10 @@
|
||||||
[self.view setNeedsLayout];
|
[self.view setNeedsLayout];
|
||||||
|
|
||||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||||
[rightToolbar setItems: [NSArray arrayWithObjects:
|
self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:
|
||||||
spacerBarButton,
|
originalStoryButton,
|
||||||
fontSettingsButton,
|
|
||||||
spacer2BarButton,
|
|
||||||
separatorBarButton,
|
separatorBarButton,
|
||||||
spacer3BarButton,
|
fontSettingsButton, nil];
|
||||||
originalStoryButton, nil]];
|
|
||||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightToolbar];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[self setNextPreviousButtons];
|
[self setNextPreviousButtons];
|
||||||
|
|
|
@ -2606,7 +2606,7 @@
|
||||||
"-all_load",
|
"-all_load",
|
||||||
);
|
);
|
||||||
PRODUCT_NAME = NewsBlur;
|
PRODUCT_NAME = NewsBlur;
|
||||||
PROVISIONING_PROFILE = "A0156932-124B-4F8E-8B93-EE6598D778F0";
|
PROVISIONING_PROFILE = "EB97D956-BB90-4F2F-9919-F71949B04B3F";
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
"WARNING_CFLAGS[arch=*]" = "-Wall";
|
"WARNING_CFLAGS[arch=*]" = "-Wall";
|
||||||
};
|
};
|
||||||
|
@ -2638,7 +2638,7 @@
|
||||||
"-all_load",
|
"-all_load",
|
||||||
);
|
);
|
||||||
PRODUCT_NAME = NewsBlur;
|
PRODUCT_NAME = NewsBlur;
|
||||||
PROVISIONING_PROFILE = "A0156932-124B-4F8E-8B93-EE6598D778F0";
|
PROVISIONING_PROFILE = "EB97D956-BB90-4F2F-9919-F71949B04B3F";
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,11 +13,13 @@
|
||||||
+(UIBarButtonItem *)barItemWithImage:(UIImage *)image target:(id)target action:(SEL)action
|
+(UIBarButtonItem *)barItemWithImage:(UIImage *)image target:(id)target action:(SEL)action
|
||||||
{
|
{
|
||||||
UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom];
|
UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
button.bounds = CGRectMake(0, 0, image.size.width, image.size.height);
|
|
||||||
[button setImage:image forState:UIControlStateNormal];
|
[button setImage:image forState:UIControlStateNormal];
|
||||||
[button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
|
[button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[button sizeToFit];
|
||||||
|
// button.imageView.contentMode = UIViewContentModeCenter;
|
||||||
UIBarButtonItem* item = [[self alloc] initWithCustomView:button];
|
UIBarButtonItem* item = [[self alloc] initWithCustomView:button];
|
||||||
|
// button.layer.borderColor = [[UIColor redColor] CGColor];
|
||||||
|
// button.layer.borderWidth = 0.5f;
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4510" systemVersion="12F37" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4510" systemVersion="12F45" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -131,14 +131,14 @@
|
||||||
<color key="shadowColor" cocoaTouchSystemColor="darkTextColor"/>
|
<color key="shadowColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||||
</label>
|
</label>
|
||||||
<segmentedControl contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="bar" selectedSegmentIndex="0" id="33">
|
<segmentedControl contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="bar" selectedSegmentIndex="0" id="33">
|
||||||
<rect key="frame" x="-3" y="0.0" width="329" height="30"/>
|
<rect key="frame" x="-4" y="0.0" width="329" height="30"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<color key="backgroundColor" red="0.90980398650000005" green="0.91764712329999998" blue="0.89411771299999998" alpha="1" colorSpace="deviceRGB"/>
|
<color key="backgroundColor" red="0.91764712333679199" green="0.92156869173049927" blue="0.94117653369903564" alpha="1" colorSpace="deviceRGB"/>
|
||||||
<segments>
|
<segments>
|
||||||
<segment title="Login"/>
|
<segment title="LOGIN"/>
|
||||||
<segment title="Signup"/>
|
<segment title="SIGNUP"/>
|
||||||
</segments>
|
</segments>
|
||||||
<color key="tintColor" red="0.1960784314" green="0.30980392159999998" blue="0.52156862749999999" alpha="1" colorSpace="calibratedRGB"/>
|
<color key="tintColor" white="0.94625342150000002" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="selectLoginSignup" destination="-1" eventType="valueChanged" id="42"/>
|
<action selector="selectLoginSignup" destination="-1" eventType="valueChanged" id="42"/>
|
||||||
</connections>
|
</connections>
|
||||||
|
|
Before Width: | Height: | Size: 919 B After Width: | Height: | Size: 829 B |
Before Width: | Height: | Size: 895 B After Width: | Height: | Size: 722 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.3 KiB |