forked from mwaterfall/MWPhotoBrowser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MWPhotoBrowser.h
70 lines (53 loc) · 1.53 KB
/
MWPhotoBrowser.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//
// MWPhotoBrowser.h
// MWPhotoBrowser
//
// Created by Michael Waterfall on 14/10/2010.
// Copyright 2010 d3i. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "MWPhoto.h"
@class ZoomingScrollView;
@interface MWPhotoBrowser : UIViewController <UIScrollViewDelegate, MWPhotoDelegate> {
// Photos
NSArray *photos;
// Views
UIScrollView *pagingScrollView;
// Paging
NSMutableSet *visiblePages, *recycledPages;
int currentPageIndex;
int pageIndexBeforeRotation;
// Navigation & controls
UIToolbar *toolbar;
NSTimer *controlVisibilityTimer;
}
// Init
- (id)initWithPhotos:(NSArray *)photosArray;
// Photos
- (UIImage *)imageAtIndex:(int)index;
// Layout
- (void)performLayout;
// Paging
- (void)tilePages;
- (BOOL)isDisplayingPageForIndex:(int)index;
- (ZoomingScrollView *)pageDisplayedAtIndex:(int)index;
- (ZoomingScrollView *)dequeueRecycledPage;
- (void)configurePage:(ZoomingScrollView *)page forIndex:(int)index;
- (void)didStartViewingPageAtIndex:(int)index;
// Frames
- (CGRect)frameForPagingScrollView;
- (CGRect)frameForPageAtIndex:(NSUInteger)index;
- (CGSize)contentSizeForPagingScrollView;
- (CGRect)frameForNavigationBarAtOrientation:(UIInterfaceOrientation)orientation;
- (CGRect)frameForToolbarAtOrientation:(UIInterfaceOrientation)orientation;
// Navigation
- (void)updateNavigation;
- (void)jumpToPageAtIndex:(int)index;
- (void)gotoPreviousPage;
- (void)gotoNextPage;
// Controls
- (void)cancelControlHiding;
- (void)hideControlsAfterDelay;
- (void)setControlsHidden:(BOOL)hidden;
- (void)toggleControls;
@end