2012-11-05 15:12:42 -08:00
|
|
|
//
|
|
|
|
// StoryPageControl.h
|
|
|
|
// NewsBlur
|
|
|
|
//
|
|
|
|
// Created by Samuel Clay on 11/2/12.
|
|
|
|
// Copyright (c) 2012 NewsBlur. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#import "BaseViewController.h"
|
|
|
|
#import "NewsBlurAppDelegate.h"
|
2012-11-05 17:16:10 -08:00
|
|
|
#import "WEPopoverController.h"
|
2012-11-05 15:12:42 -08:00
|
|
|
|
|
|
|
@class NewsBlurAppDelegate;
|
2012-11-05 17:16:10 -08:00
|
|
|
@class ASIHTTPRequest;
|
2012-11-05 15:12:42 -08:00
|
|
|
|
2012-11-05 17:16:10 -08:00
|
|
|
@interface StoryPageControl : BaseViewController
|
|
|
|
<UIScrollViewDelegate, UIPopoverControllerDelegate, WEPopoverControllerDelegate> {
|
2012-11-05 15:12:42 -08:00
|
|
|
|
|
|
|
NewsBlurAppDelegate *appDelegate;
|
2012-11-05 17:16:10 -08:00
|
|
|
|
|
|
|
UIProgressView *progressView;
|
|
|
|
UIToolbar *toolbar;
|
|
|
|
UIBarButtonItem *buttonPrevious;
|
|
|
|
UIBarButtonItem *buttonNext;
|
|
|
|
UIBarButtonItem *activity;
|
|
|
|
UIActivityIndicatorView *loadingIndicator;
|
|
|
|
UIToolbar *bottomPlaceholderToolbar;
|
|
|
|
UIBarButtonItem *buttonBack;
|
|
|
|
|
|
|
|
WEPopoverController *popoverController;
|
|
|
|
Class popoverClass;
|
2012-11-05 15:12:42 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
@property (nonatomic) IBOutlet NewsBlurAppDelegate *appDelegate;
|
|
|
|
@property (nonatomic) StoryDetailViewController *currentPage;
|
|
|
|
@property (nonatomic) StoryDetailViewController *nextPage;
|
|
|
|
@property (nonatomic, strong) IBOutlet UIScrollView *scrollView;
|
|
|
|
@property (nonatomic, strong) IBOutlet UIPageControl *pageControl;
|
|
|
|
|
2012-11-05 17:16:10 -08:00
|
|
|
@property (nonatomic, strong) UIActivityIndicatorView *loadingIndicator;
|
|
|
|
@property (nonatomic) IBOutlet UIProgressView *progressView;
|
|
|
|
@property (strong, nonatomic) IBOutlet UIView *progressViewContainer;
|
|
|
|
@property (nonatomic) IBOutlet UIToolbar *toolbar;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem *buttonPrevious;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem *buttonNext;
|
|
|
|
@property (nonatomic) UIBarButtonItem *buttonBack;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem *activity;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem *buttonAction;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem *buttonNextStory;
|
|
|
|
@property (nonatomic) IBOutlet UIToolbar *bottomPlaceholderToolbar;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem *fontSettingsButton;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem *originalStoryButton;
|
|
|
|
@property (nonatomic, strong) IBOutlet UIBarButtonItem *subscribeButton;
|
2012-11-07 17:54:16 -08:00
|
|
|
@property (readwrite) CGFloat inTouchMove;
|
2012-11-05 17:16:10 -08:00
|
|
|
|
|
|
|
@property (nonatomic, strong) WEPopoverController *popoverController;
|
|
|
|
|
2012-11-06 17:26:08 -08:00
|
|
|
- (void)resizeScrollView;
|
2012-11-05 15:12:42 -08:00
|
|
|
- (void)applyNewIndex:(NSInteger)newIndex pageController:(StoryDetailViewController *)pageController;
|
|
|
|
|
2012-11-07 17:54:16 -08:00
|
|
|
- (void)transitionFromFeedDetail;
|
|
|
|
- (void)clearStory;
|
2012-11-08 17:39:32 -08:00
|
|
|
- (void)setStoryFromScroll;
|
|
|
|
- (void)updatePageWithActiveStory:(int)location;
|
2012-11-05 17:16:10 -08:00
|
|
|
- (void)changePage:(NSInteger)pageIndex;
|
|
|
|
- (void)requestFailed:(ASIHTTPRequest *)request;
|
|
|
|
|
|
|
|
- (void)setNextPreviousButtons;
|
|
|
|
- (void)markStoryAsRead;
|
|
|
|
- (void)finishMarkAsRead:(ASIHTTPRequest *)request;
|
|
|
|
- (void)openSendToDialog;
|
|
|
|
- (void)markStoryAsUnread;
|
|
|
|
- (void)finishMarkAsUnread:(ASIHTTPRequest *)request;
|
|
|
|
- (void)markStoryAsSaved;
|
|
|
|
- (void)finishMarkAsSaved:(ASIHTTPRequest *)request;
|
|
|
|
- (void)markStoryAsUnsaved;
|
|
|
|
- (void)finishMarkAsUnsaved:(ASIHTTPRequest *)request;
|
|
|
|
|
|
|
|
- (IBAction)toggleFontSize:(id)sender;
|
|
|
|
|
|
|
|
- (IBAction)showOriginalSubview:(id)sender;
|
|
|
|
- (IBAction)doNextUnreadStory;
|
|
|
|
- (IBAction)doNextStory;
|
|
|
|
- (IBAction)doPreviousStory;
|
|
|
|
- (IBAction)tapProgressBar:(id)sender;
|
2012-11-05 15:12:42 -08:00
|
|
|
|
|
|
|
@end
|