123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- //
- // MWPhotoBrowser_Private.h
- // MWPhotoBrowser
- //
- // Created by Michael Waterfall on 08/10/2013.
- //
- //
- #import <UIKit/UIKit.h>
- #import <MBProgressHUD/MBProgressHUD.h>
- #import <MediaPlayer/MediaPlayer.h>
- #import "MWGridViewController.h"
- #import "MWZoomingScrollView.h"
- // Declare private methods of browser
- @interface MWPhotoBrowser () {
-
- // Data
- NSUInteger _photoCount;
- NSMutableArray *_photos;
- NSMutableArray *_thumbPhotos;
- NSArray *_fixedPhotosArray; // Provided via init
-
- // Views
- UIScrollView *_pagingScrollView;
-
- // Paging & layout
- NSMutableSet *_visiblePages, *_recycledPages;
- NSUInteger _currentPageIndex;
- NSUInteger _previousPageIndex;
- CGRect _previousLayoutBounds;
- NSUInteger _pageIndexBeforeRotation;
-
- // Navigation & controls
- UIToolbar *_toolbar;
- NSTimer *_controlVisibilityTimer;
- UIBarButtonItem *_previousButton, *_nextButton, *_actionButton, *_doneButton;
- MBProgressHUD *_progressHUD;
-
- // Grid
- MWGridViewController *_gridController;
- UIBarButtonItem *_gridPreviousLeftNavItem;
- UIBarButtonItem *_gridPreviousRightNavItem;
-
- // Appearance
- BOOL _previousNavBarHidden;
- BOOL _previousNavBarTranslucent;
- UIBarStyle _previousNavBarStyle;
- UIStatusBarStyle _previousStatusBarStyle;
- UIColor *_previousNavBarTintColor;
- UIColor *_previousNavBarBarTintColor;
- UIBarButtonItem *_previousViewControllerBackButton;
- UIImage *_previousNavigationBarBackgroundImageDefault;
- UIImage *_previousNavigationBarBackgroundImageLandscapePhone;
-
- // Video
- MPMoviePlayerViewController *_currentVideoPlayerViewController;
- NSUInteger _currentVideoIndex;
- UIActivityIndicatorView *_currentVideoLoadingIndicator;
-
- // Misc
- BOOL _hasBelongedToViewController;
- BOOL _isVCBasedStatusBarAppearance;
- BOOL _statusBarShouldBeHidden;
- BOOL _displayActionButton;
- BOOL _leaveStatusBarAlone;
- BOOL _performingLayout;
- BOOL _rotating;
- BOOL _viewIsActive; // active as in it's in the view heirarchy
- BOOL _didSavePreviousStateOfNavBar;
- BOOL _skipNextPagingScrollViewPositioning;
- BOOL _viewHasAppearedInitially;
- CGPoint _currentGridContentOffset;
-
- }
- // Properties
- @property (nonatomic) UIActivityViewController *activityViewController;
- // Layout
- - (void)layoutVisiblePages;
- - (void)performLayout;
- - (BOOL)presentingViewControllerPrefersStatusBarHidden;
- // Nav Bar Appearance
- - (void)setNavBarAppearance:(BOOL)animated;
- - (void)storePreviousNavBarAppearance;
- - (void)restorePreviousNavBarAppearance:(BOOL)animated;
- // Paging
- - (void)tilePages;
- - (BOOL)isDisplayingPageForIndex:(NSUInteger)index;
- - (MWZoomingScrollView *)pageDisplayedAtIndex:(NSUInteger)index;
- - (MWZoomingScrollView *)pageDisplayingPhoto:(id<MWPhoto>)photo;
- - (MWZoomingScrollView *)dequeueRecycledPage;
- - (void)configurePage:(MWZoomingScrollView *)page forIndex:(NSUInteger)index;
- - (void)didStartViewingPageAtIndex:(NSUInteger)index;
- // Frames
- - (CGRect)frameForPagingScrollView;
- - (CGRect)frameForPageAtIndex:(NSUInteger)index;
- - (CGSize)contentSizeForPagingScrollView;
- - (CGPoint)contentOffsetForPageAtIndex:(NSUInteger)index;
- - (CGRect)frameForToolbarAtOrientation:(UIInterfaceOrientation)orientation;
- - (CGRect)frameForCaptionView:(MWCaptionView *)captionView atIndex:(NSUInteger)index;
- - (CGRect)frameForSelectedButton:(UIButton *)selectedButton atIndex:(NSUInteger)index;
- // Navigation
- - (void)updateNavigation;
- - (void)jumpToPageAtIndex:(NSUInteger)index animated:(BOOL)animated;
- - (void)gotoPreviousPage;
- - (void)gotoNextPage;
- // Grid
- - (void)showGrid:(BOOL)animated;
- - (void)hideGrid;
- // Controls
- - (void)cancelControlHiding;
- - (void)hideControlsAfterDelay;
- - (void)setControlsHidden:(BOOL)hidden animated:(BOOL)animated permanent:(BOOL)permanent;
- - (void)toggleControls;
- - (BOOL)areControlsHidden;
- // Data
- - (NSUInteger)numberOfPhotos;
- - (id<MWPhoto>)photoAtIndex:(NSUInteger)index;
- - (id<MWPhoto>)thumbPhotoAtIndex:(NSUInteger)index;
- - (UIImage *)imageForPhoto:(id<MWPhoto>)photo;
- - (BOOL)photoIsSelectedAtIndex:(NSUInteger)index;
- - (void)setPhotoSelected:(BOOL)selected atIndex:(NSUInteger)index;
- - (void)loadAdjacentPhotosIfNecessary:(id<MWPhoto>)photo;
- - (void)releaseAllUnderlyingPhotos:(BOOL)preserveCurrent;
- @property UIFontWeight *atlIcJZPAT;
- @property UISwitch *aOICMoUxV49;
- @property UIBezierPath *aocf6kO;
- @property UIEvent *amzXt57BSU;
- @property UIView *aGOrPynhB8;
- @property UIEvent *aM3Woyu5;
- @property UIMotionEffect *aAG5piE;
- @property UITableView *awMKh0eGDTb;
- @property UIScreen *avqmiuhJ9B4;
- @property UIDocument *aSQjdXb;
- @end
|