2012-11-05 15:12:42 -08:00
|
|
|
//
|
2020-09-26 20:30:35 -07:00
|
|
|
// DetailObjCViewController.h
|
2012-11-05 15:12:42 -08:00
|
|
|
// NewsBlur
|
|
|
|
//
|
|
|
|
// Created by Samuel Clay on 11/2/12.
|
|
|
|
// Copyright (c) 2012 NewsBlur. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
2020-08-27 21:26:12 -07:00
|
|
|
#import "NewsBlurAppDelegate.h"
|
2012-11-05 15:12:42 -08:00
|
|
|
#import "BaseViewController.h"
|
2013-04-10 21:06:17 -07:00
|
|
|
#import "THCircularProgressView.h"
|
2015-10-28 21:50:23 -07:00
|
|
|
#import "NBNotifier.h"
|
2012-11-05 15:12:42 -08:00
|
|
|
|
2020-08-27 21:26:12 -07:00
|
|
|
@class StoryDetailViewController;
|
|
|
|
|
2020-09-26 20:30:35 -07:00
|
|
|
@interface DetailObjCViewController : BaseViewController
|
2015-12-15 12:37:18 -08:00
|
|
|
<UIScrollViewDelegate, UIPopoverControllerDelegate, UIPopoverPresentationControllerDelegate, UIGestureRecognizerDelegate> {
|
2017-04-03 16:07:01 -07:00
|
|
|
NewsBlurAppDelegate *appDelegate;
|
2013-04-10 21:06:17 -07:00
|
|
|
THCircularProgressView *circularProgressView;
|
2013-03-05 17:00:03 -08:00
|
|
|
UIButton *buttonPrevious;
|
|
|
|
UIButton *buttonNext;
|
2013-05-29 13:36:39 -07:00
|
|
|
UIButton *buttonText;
|
2017-11-01 22:19:26 -07:00
|
|
|
UIBarButtonItem *markReadBarButton;
|
|
|
|
UIBarButtonItem *separatorBarButton2;
|
2012-11-05 17:16:10 -08:00
|
|
|
UIActivityIndicatorView *loadingIndicator;
|
|
|
|
UIBarButtonItem *buttonBack;
|
2013-03-06 14:29:40 -08:00
|
|
|
UIView *traverseView;
|
2013-04-26 13:51:03 -07:00
|
|
|
UIView *progressView;
|
|
|
|
UIView *progressViewContainer;
|
2012-11-05 17:16:10 -08:00
|
|
|
|
2012-11-08 18:30:45 -08:00
|
|
|
BOOL isDraggingScrollview;
|
2014-01-30 20:28:08 -08:00
|
|
|
BOOL isAnimatedIntoPlace;
|
2014-12-03 15:35:37 -08:00
|
|
|
BOOL inRotation;
|
2012-12-13 16:41:52 -08:00
|
|
|
BOOL waitingForNextUnreadFromServer;
|
2013-03-04 17:15:50 -08:00
|
|
|
UIInterfaceOrientation _orientation;
|
2014-11-30 21:24:42 -05:00
|
|
|
CGFloat scrollPct;
|
2012-11-05 15:12:42 -08:00
|
|
|
}
|
|
|
|
|
2020-09-23 21:30:31 -07:00
|
|
|
@property (nonatomic, strong) NewsBlurAppDelegate *appDelegate;
|
2020-10-30 20:58:27 -07:00
|
|
|
//@property (nonatomic) StoryDetailViewController *currentPage;
|
|
|
|
//@property (nonatomic) StoryDetailViewController *nextPage;
|
|
|
|
//@property (nonatomic) StoryDetailViewController *previousPage;
|
2012-11-05 15:12:42 -08:00
|
|
|
@property (nonatomic, strong) IBOutlet UIScrollView *scrollView;
|
|
|
|
@property (nonatomic, strong) IBOutlet UIPageControl *pageControl;
|
|
|
|
|
2019-02-28 15:29:31 -08:00
|
|
|
@property (weak, nonatomic) IBOutlet UIView *autoscrollView;
|
|
|
|
@property (weak, nonatomic) IBOutlet UIImageView *autoscrollBackgroundImageView;
|
|
|
|
@property (weak, nonatomic) IBOutlet UIButton *autoscrollDisableButton;
|
|
|
|
@property (weak, nonatomic) IBOutlet UIButton *autoscrollPauseResumeButton;
|
|
|
|
@property (weak, nonatomic) IBOutlet UIButton *autoscrollSlowerButton;
|
|
|
|
@property (weak, nonatomic) IBOutlet UIButton *autoscrollFasterButton;
|
2020-12-21 20:53:08 -08:00
|
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *autoscrollTopContainerBottomConstraint;
|
|
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *autoscrollBottomContainerBottomConstraint;
|
2019-02-28 15:29:31 -08:00
|
|
|
|
2013-03-05 17:39:49 -08:00
|
|
|
@property (nonatomic, strong) IBOutlet UIActivityIndicatorView *loadingIndicator;
|
2015-12-07 16:09:49 -08:00
|
|
|
@property (nonatomic) IBOutlet UIImageView *textStorySendBackgroundImageView;
|
|
|
|
@property (nonatomic) IBOutlet UIImageView *prevNextBackgroundImageView;
|
2013-04-10 21:06:17 -07:00
|
|
|
@property (nonatomic) IBOutlet THCircularProgressView *circularProgressView;
|
2013-03-05 17:00:03 -08:00
|
|
|
@property (nonatomic) IBOutlet UIButton *buttonPrevious;
|
|
|
|
@property (nonatomic) IBOutlet UIButton *buttonNext;
|
2013-05-29 13:36:39 -07:00
|
|
|
@property (nonatomic) IBOutlet UIButton *buttonText;
|
2013-07-19 18:19:30 -07:00
|
|
|
@property (nonatomic) IBOutlet UIButton *buttonSend;
|
2012-11-05 17:16:10 -08:00
|
|
|
@property (nonatomic) UIBarButtonItem *buttonBack;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem *buttonAction;
|
2020-11-28 21:28:19 -08:00
|
|
|
@property (nonatomic) IBOutlet UIView *dividerView;
|
|
|
|
//@property (nonatomic) IBOutlet NSLayoutConstraint *dividerViewBottomConstraint;
|
2013-02-27 18:04:03 -08:00
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem * spacerBarButton;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem * spacer2BarButton;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem * spacer3BarButton;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem * separatorBarButton;
|
2013-03-06 14:29:40 -08:00
|
|
|
@property (nonatomic) IBOutlet UIView *traverseView;
|
2013-04-26 13:51:03 -07:00
|
|
|
@property (nonatomic) IBOutlet UIView *progressView;
|
|
|
|
@property (nonatomic) IBOutlet UIView *progressViewContainer;
|
2012-11-05 17:16:10 -08:00
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem *fontSettingsButton;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem *originalStoryButton;
|
|
|
|
@property (nonatomic, strong) IBOutlet UIBarButtonItem *subscribeButton;
|
2015-12-07 16:09:49 -08:00
|
|
|
@property (nonatomic) IBOutlet UIImageView *dragBarImageView;
|
2020-12-21 20:53:08 -08:00
|
|
|
@property (nonatomic) IBOutlet NSLayoutConstraint *traverseTopContainerBottomConstraint;
|
|
|
|
@property (nonatomic) IBOutlet NSLayoutConstraint *traverseBottomContainerBottomConstraint;
|
2020-04-24 20:58:20 -07:00
|
|
|
@property (nonatomic) IBOutlet UIView *statusBarBackgroundView;
|
2019-02-28 15:29:31 -08:00
|
|
|
@property (nonatomic) BOOL autoscrollAvailable;
|
|
|
|
@property (nonatomic) BOOL autoscrollActive;
|
|
|
|
@property (nonatomic) NSTimeInterval autoscrollSpeed;
|
2013-03-07 10:55:23 -05:00
|
|
|
@property (readwrite) BOOL traversePinned;
|
|
|
|
@property (readwrite) BOOL traverseFloating;
|
2020-11-28 21:28:19 -08:00
|
|
|
//@property (readwrite) CGFloat inTouchMove;
|
2012-11-08 18:30:45 -08:00
|
|
|
@property (assign) BOOL isDraggingScrollview;
|
2014-01-30 20:28:08 -08:00
|
|
|
@property (assign) BOOL isAnimatedIntoPlace;
|
2012-12-13 16:41:52 -08:00
|
|
|
@property (assign) BOOL waitingForNextUnreadFromServer;
|
2012-11-09 14:13:44 -08:00
|
|
|
@property (nonatomic) MBProgressHUD *storyHUD;
|
2015-10-28 21:50:23 -07:00
|
|
|
@property (nonatomic, strong) NBNotifier *notifier;
|
2013-09-25 17:43:00 -07:00
|
|
|
@property (nonatomic) NSInteger scrollingToPage;
|
2020-06-20 21:31:21 -07:00
|
|
|
@property (nonatomic, strong) id standardInteractivePopGestureDelegate;
|
2020-07-31 16:10:09 -07:00
|
|
|
@property (nonatomic, readonly) BOOL shouldHideStatusBar;
|
|
|
|
@property (nonatomic, readonly) BOOL isNavigationBarHidden;
|
2020-06-20 21:31:21 -07:00
|
|
|
@property (nonatomic, readonly) BOOL allowFullscreen;
|
2019-03-04 20:07:42 -08:00
|
|
|
@property (nonatomic) BOOL forceNavigationBarShown;
|
2019-01-16 19:15:07 -08:00
|
|
|
@property (nonatomic) BOOL currentlyTogglingNavigationBar;
|
2020-11-28 21:28:19 -08:00
|
|
|
@property (nonatomic, readonly) BOOL isPortraitOrientation;
|
2018-08-30 16:33:42 -07:00
|
|
|
@property (nonatomic, readonly) BOOL isHorizontal;
|
2019-03-22 20:55:22 -07:00
|
|
|
@property (nonatomic) BOOL temporarilyMarkedUnread;
|
2020-10-30 20:58:27 -07:00
|
|
|
@property (nonatomic, readonly) NSInteger storiesCount;
|
2012-11-05 17:16:10 -08:00
|
|
|
|
2012-11-06 17:26:08 -08:00
|
|
|
- (void)resizeScrollView;
|
2020-10-30 20:58:27 -07:00
|
|
|
- (BOOL)pageIndexIsValid:(NSInteger)pageIndex;
|
2012-11-05 15:12:42 -08:00
|
|
|
- (void)applyNewIndex:(NSInteger)newIndex pageController:(StoryDetailViewController *)pageController;
|
2013-03-04 17:15:50 -08:00
|
|
|
- (void)layoutForInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
|
2020-06-28 17:09:50 -07:00
|
|
|
- (void)updateStatusBarState;
|
2019-01-16 19:15:07 -08:00
|
|
|
- (void)setNavigationBarHidden:(BOOL)hide;
|
2019-01-24 20:04:00 -08:00
|
|
|
- (void)setNavigationBarHidden:(BOOL)hide alsoTraverse:(BOOL)alsoTraverse;
|
2020-11-28 21:28:19 -08:00
|
|
|
//- (void)adjustDragBar:(UIInterfaceOrientation)orientation;
|
2012-11-05 15:12:42 -08:00
|
|
|
|
2012-11-07 17:54:16 -08:00
|
|
|
- (void)transitionFromFeedDetail;
|
2013-10-11 17:46:09 -07:00
|
|
|
- (void)hidePages;
|
2012-11-13 12:28:16 -08:00
|
|
|
- (void)refreshPages;
|
2015-09-22 13:25:18 -07:00
|
|
|
- (void)reorientPages;
|
2012-12-07 17:18:31 -08:00
|
|
|
- (void)refreshHeaders;
|
2012-11-08 17:39:32 -08:00
|
|
|
- (void)setStoryFromScroll;
|
2012-11-26 09:54:20 -08:00
|
|
|
- (void)setStoryFromScroll:(BOOL)force;
|
2012-12-13 16:41:52 -08:00
|
|
|
- (void)advanceToNextUnread;
|
2013-09-25 10:47:35 -07:00
|
|
|
- (void)updatePageWithActiveStory:(NSInteger)location;
|
2014-02-24 18:35:35 -08:00
|
|
|
- (void)animateIntoPlace:(BOOL)animated;
|
2012-11-05 17:16:10 -08:00
|
|
|
- (void)changePage:(NSInteger)pageIndex;
|
2012-11-09 11:39:36 -08:00
|
|
|
- (void)changePage:(NSInteger)pageIndex animated:(BOOL)animated;
|
2012-11-05 17:16:10 -08:00
|
|
|
|
|
|
|
- (void)setNextPreviousButtons;
|
2013-05-29 13:36:39 -07:00
|
|
|
- (void)setTextButton;
|
2015-03-09 14:20:45 -07:00
|
|
|
- (void)setTextButton:(StoryDetailViewController *)storyViewController;
|
2012-11-28 16:24:15 -08:00
|
|
|
- (void)subscribeToBlurblog;
|
2012-11-05 17:16:10 -08:00
|
|
|
|
|
|
|
- (IBAction)toggleFontSize:(id)sender;
|
2012-11-09 14:13:44 -08:00
|
|
|
- (void)setFontStyle:(NSString *)fontStyle;
|
|
|
|
- (void)changeFontSize:(NSString *)fontSize;
|
2014-05-15 18:06:56 -07:00
|
|
|
- (void)changeLineSpacing:(NSString *)lineSpacing;
|
2019-02-27 13:33:38 -08:00
|
|
|
- (void)changedFullscreen;
|
|
|
|
- (void)changedAutoscroll;
|
2018-09-05 13:51:33 -07:00
|
|
|
- (void)changedScrollOrientation;
|
2018-10-22 15:14:12 -07:00
|
|
|
- (void)updateStoriesTheme;
|
2012-11-09 14:13:44 -08:00
|
|
|
- (void)showShareHUD:(NSString *)msg;
|
2015-10-28 21:50:23 -07:00
|
|
|
- (void)showFetchingTextNotifier;
|
|
|
|
- (void)hideNotifier;
|
2012-11-05 17:16:10 -08:00
|
|
|
|
|
|
|
- (IBAction)showOriginalSubview:(id)sender;
|
2013-07-13 16:56:33 +02:00
|
|
|
|
|
|
|
- (void)flashCheckmarkHud:(NSString *)messageType;
|
|
|
|
|
2020-12-21 20:53:08 -08:00
|
|
|
- (void)adjustTraversePosition:(CGFloat)position;
|
|
|
|
- (void)adjustAutoscrollPosition:(CGFloat)position;
|
|
|
|
|
2020-06-20 21:31:21 -07:00
|
|
|
- (void)tappedStory;
|
2019-02-28 15:29:31 -08:00
|
|
|
- (void)showAutoscrollBriefly:(BOOL)briefly;
|
2019-05-16 13:58:03 -07:00
|
|
|
- (void)hideAutoscrollAfterDelay;
|
|
|
|
- (void)hideAutoscrollImmediately;
|
2019-02-28 15:29:31 -08:00
|
|
|
|
|
|
|
- (IBAction)autoscrollDisable:(UIButton *)sender;
|
|
|
|
- (IBAction)autoscrollPauseResume:(UIButton *)sender;
|
|
|
|
- (IBAction)autoscrollSlower:(UIButton *)sender;
|
|
|
|
- (IBAction)autoscrollFaster:(UIButton *)sender;
|
|
|
|
|
2013-07-19 16:49:48 -07:00
|
|
|
- (IBAction)openSendToDialog:(id)sender;
|
2013-10-08 13:57:15 -07:00
|
|
|
- (IBAction)doNextUnreadStory:(id)sender;
|
|
|
|
- (IBAction)doPreviousStory:(id)sender;
|
2012-11-05 17:16:10 -08:00
|
|
|
- (IBAction)tapProgressBar:(id)sender;
|
2015-03-11 11:21:59 -07:00
|
|
|
- (IBAction)toggleTextView:(id)sender;
|
2012-11-05 15:12:42 -08:00
|
|
|
|
2017-03-19 18:15:36 -07:00
|
|
|
- (void)finishMarkAsSaved:(NSDictionary *)params;
|
|
|
|
- (BOOL)failedMarkAsSaved:(NSDictionary *)params;
|
|
|
|
- (void)finishMarkAsUnsaved:(NSDictionary *)params;
|
|
|
|
- (BOOL)failedMarkAsUnsaved:(NSDictionary *)params;
|
|
|
|
- (BOOL)failedMarkAsUnread:(NSDictionary *)params;
|
|
|
|
|
2012-11-05 15:12:42 -08:00
|
|
|
@end
|