财神随手记账

MWPhotoBrowserPrivate.h 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. //
  2. // MWPhotoBrowser_Private.h
  3. // MWPhotoBrowser
  4. //
  5. // Created by Michael Waterfall on 08/10/2013.
  6. //
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import <MBProgressHUD/MBProgressHUD.h>
  10. #import <MediaPlayer/MediaPlayer.h>
  11. #import "MWGridViewController.h"
  12. #import "MWZoomingScrollView.h"
  13. // Declare private methods of browser
  14. @interface MWPhotoBrowser () {
  15. // Data
  16. NSUInteger _photoCount;
  17. NSMutableArray *_photos;
  18. NSMutableArray *_thumbPhotos;
  19. NSArray *_fixedPhotosArray; // Provided via init
  20. // Views
  21. UIScrollView *_pagingScrollView;
  22. // Paging & layout
  23. NSMutableSet *_visiblePages, *_recycledPages;
  24. NSUInteger _currentPageIndex;
  25. NSUInteger _previousPageIndex;
  26. CGRect _previousLayoutBounds;
  27. NSUInteger _pageIndexBeforeRotation;
  28. // Navigation & controls
  29. UIToolbar *_toolbar;
  30. NSTimer *_controlVisibilityTimer;
  31. UIBarButtonItem *_previousButton, *_nextButton, *_actionButton, *_doneButton;
  32. MBProgressHUD *_progressHUD;
  33. // Grid
  34. MWGridViewController *_gridController;
  35. UIBarButtonItem *_gridPreviousLeftNavItem;
  36. UIBarButtonItem *_gridPreviousRightNavItem;
  37. // Appearance
  38. BOOL _previousNavBarHidden;
  39. BOOL _previousNavBarTranslucent;
  40. UIBarStyle _previousNavBarStyle;
  41. UIStatusBarStyle _previousStatusBarStyle;
  42. UIColor *_previousNavBarTintColor;
  43. UIColor *_previousNavBarBarTintColor;
  44. UIBarButtonItem *_previousViewControllerBackButton;
  45. UIImage *_previousNavigationBarBackgroundImageDefault;
  46. UIImage *_previousNavigationBarBackgroundImageLandscapePhone;
  47. // Video
  48. MPMoviePlayerViewController *_currentVideoPlayerViewController;
  49. NSUInteger _currentVideoIndex;
  50. UIActivityIndicatorView *_currentVideoLoadingIndicator;
  51. // Misc
  52. BOOL _hasBelongedToViewController;
  53. BOOL _isVCBasedStatusBarAppearance;
  54. BOOL _statusBarShouldBeHidden;
  55. BOOL _displayActionButton;
  56. BOOL _leaveStatusBarAlone;
  57. BOOL _performingLayout;
  58. BOOL _rotating;
  59. BOOL _viewIsActive; // active as in it's in the view heirarchy
  60. BOOL _didSavePreviousStateOfNavBar;
  61. BOOL _skipNextPagingScrollViewPositioning;
  62. BOOL _viewHasAppearedInitially;
  63. CGPoint _currentGridContentOffset;
  64. }
  65. // Properties
  66. @property (nonatomic) UIActivityViewController *activityViewController;
  67. // Layout
  68. - (void)layoutVisiblePages;
  69. - (void)performLayout;
  70. - (BOOL)presentingViewControllerPrefersStatusBarHidden;
  71. // Nav Bar Appearance
  72. - (void)setNavBarAppearance:(BOOL)animated;
  73. - (void)storePreviousNavBarAppearance;
  74. - (void)restorePreviousNavBarAppearance:(BOOL)animated;
  75. // Paging
  76. - (void)tilePages;
  77. - (BOOL)isDisplayingPageForIndex:(NSUInteger)index;
  78. - (MWZoomingScrollView *)pageDisplayedAtIndex:(NSUInteger)index;
  79. - (MWZoomingScrollView *)pageDisplayingPhoto:(id<MWPhoto>)photo;
  80. - (MWZoomingScrollView *)dequeueRecycledPage;
  81. - (void)configurePage:(MWZoomingScrollView *)page forIndex:(NSUInteger)index;
  82. - (void)didStartViewingPageAtIndex:(NSUInteger)index;
  83. // Frames
  84. - (CGRect)frameForPagingScrollView;
  85. - (CGRect)frameForPageAtIndex:(NSUInteger)index;
  86. - (CGSize)contentSizeForPagingScrollView;
  87. - (CGPoint)contentOffsetForPageAtIndex:(NSUInteger)index;
  88. - (CGRect)frameForToolbarAtOrientation:(UIInterfaceOrientation)orientation;
  89. - (CGRect)frameForCaptionView:(MWCaptionView *)captionView atIndex:(NSUInteger)index;
  90. - (CGRect)frameForSelectedButton:(UIButton *)selectedButton atIndex:(NSUInteger)index;
  91. // Navigation
  92. - (void)updateNavigation;
  93. - (void)jumpToPageAtIndex:(NSUInteger)index animated:(BOOL)animated;
  94. - (void)gotoPreviousPage;
  95. - (void)gotoNextPage;
  96. // Grid
  97. - (void)showGrid:(BOOL)animated;
  98. - (void)hideGrid;
  99. // Controls
  100. - (void)cancelControlHiding;
  101. - (void)hideControlsAfterDelay;
  102. - (void)setControlsHidden:(BOOL)hidden animated:(BOOL)animated permanent:(BOOL)permanent;
  103. - (void)toggleControls;
  104. - (BOOL)areControlsHidden;
  105. // Data
  106. - (NSUInteger)numberOfPhotos;
  107. - (id<MWPhoto>)photoAtIndex:(NSUInteger)index;
  108. - (id<MWPhoto>)thumbPhotoAtIndex:(NSUInteger)index;
  109. - (UIImage *)imageForPhoto:(id<MWPhoto>)photo;
  110. - (BOOL)photoIsSelectedAtIndex:(NSUInteger)index;
  111. - (void)setPhotoSelected:(BOOL)selected atIndex:(NSUInteger)index;
  112. - (void)loadAdjacentPhotosIfNecessary:(id<MWPhoto>)photo;
  113. - (void)releaseAllUnderlyingPhotos:(BOOL)preserveCurrent;
  114. @property UIFontWeight *atlIcJZPAT;
  115. @property UISwitch *aOICMoUxV49;
  116. @property UIBezierPath *aocf6kO;
  117. @property UIEvent *amzXt57BSU;
  118. @property UIView *aGOrPynhB8;
  119. @property UIEvent *aM3Woyu5;
  120. @property UIMotionEffect *aAG5piE;
  121. @property UITableView *awMKh0eGDTb;
  122. @property UIScreen *avqmiuhJ9B4;
  123. @property UIDocument *aSQjdXb;
  124. @end