This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
_n_i_photo_album_scroll_view_8h_source.html
260 lines (242 loc) · 16.8 KB
/
_n_i_photo_album_scroll_view_8h_source.html
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Nimbus: /Users/featherless/workbench/ios/nimbus/src/photos/src/NIPhotoAlbumScrollView.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-24278774-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="page">
<div style="position:relative">
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<a style="float: right;margin-right:20px;margin-top:20px" href='http://www.pledgie.com/campaigns/15519'><img alt='Click here to support Nimbus development and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/15519.png?skin_name=chrome' border='0' /></a>
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Nimbus
 <span id="projectnumber">0.4.1.0 - <a href="http://github.com/jverkoey/nimbus">Nimbus is proudly hosted on Github</a></span>
</div>
<div id="projectbrief">An iOS framework whose growth is bounded by O(documentation).</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.4-20110629 -->
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
initNavTree('_n_i_photo_album_scroll_view_8h.html','');
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">/Users/featherless/workbench/ios/nimbus/src/photos/src/NIPhotoAlbumScrollView.h</div> </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span>
<a name="l00002"></a>00002 <span class="comment">// Copyright 2011 Jeff Verkoeyen</span>
<a name="l00003"></a>00003 <span class="comment">//</span>
<a name="l00004"></a>00004 <span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span>
<a name="l00005"></a>00005 <span class="comment">// you may not use this file except in compliance with the License.</span>
<a name="l00006"></a>00006 <span class="comment">// You may obtain a copy of the License at</span>
<a name="l00007"></a>00007 <span class="comment">//</span>
<a name="l00008"></a>00008 <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span>
<a name="l00009"></a>00009 <span class="comment">//</span>
<a name="l00010"></a>00010 <span class="comment">// Unless required by applicable law or agreed to in writing, software</span>
<a name="l00011"></a>00011 <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span>
<a name="l00012"></a>00012 <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<a name="l00013"></a>00013 <span class="comment">// See the License for the specific language governing permissions and</span>
<a name="l00014"></a>00014 <span class="comment">// limitations under the License.</span>
<a name="l00015"></a>00015 <span class="comment">//</span>
<a name="l00016"></a>00016
<a name="l00017"></a>00017 <span class="preprocessor">#import <Foundation/Foundation.h></span>
<a name="l00018"></a>00018 <span class="preprocessor">#import <UIKit/UIKit.h></span>
<a name="l00019"></a>00019
<a name="l00020"></a>00020 <span class="preprocessor">#import "NIPhotoScrollView.h"</span>
<a name="l00021"></a>00021
<a name="l00025"></a>00025 <span class="keyword">extern</span> <span class="keyword">const</span> NSInteger NIPhotoAlbumScrollViewUnknownNumberOfPhotos;
<a name="l00026"></a>00026
<a name="l00030"></a>00030 <span class="keyword">extern</span> <span class="keyword">const</span> CGFloat NIPhotoAlbumScrollViewDefaultPageHorizontalMargin;
<a name="l00031"></a>00031
<a name="l00032"></a>00032 <span class="keyword">@protocol </span><a class="code" href="protocol_n_i_photo_album_scroll_view_data_source-p.html" title="The photo album scroll data source.">NIPhotoAlbumScrollViewDataSource</a>;
<a name="l00033"></a>00033 <span class="keyword">@protocol </span><a class="code" href="protocol_n_i_photo_album_scroll_view_delegate-p.html" title="The photo album scroll view delegate.">NIPhotoAlbumScrollViewDelegate</a>;
<a name="l00034"></a>00034
<a name="l00050"></a><a class="code" href="interface_n_i_photo_album_scroll_view.html">00050</a> <span class="keyword">@interface </span><a class="code" href="interface_n_i_photo_album_scroll_view.html" title="A paged scroll view that shows a collection of photos.">NIPhotoAlbumScrollView</a> : UIView <
<a name="l00051"></a>00051 UIScrollViewDelegate,
<a name="l00052"></a>00052 <a class="code" href="protocol_n_i_photo_scroll_view_delegate-p.html" title="The photo scroll view delegate.">NIPhotoScrollViewDelegate</a>> {
<a name="l00053"></a>00053 <span class="keyword">@private</span>
<a name="l00054"></a>00054 UIScrollView* _pagingScrollView;
<a name="l00055"></a>00055
<a name="l00056"></a>00056 <span class="comment">// Sets of NIPhotoScrollViews</span>
<a name="l00057"></a>00057 NSMutableSet* _visiblePages;
<a name="l00058"></a>00058 NSMutableSet* _recycledPages;
<a name="l00059"></a>00059
<a name="l00060"></a>00060 <span class="comment">// Configurable Properties</span>
<a name="l00061"></a>00061 UIImage* _loadingImage;
<a name="l00062"></a>00062 CGFloat _pageHorizontalMargin;
<a name="l00063"></a>00063 BOOL _zoomingIsEnabled;
<a name="l00064"></a>00064 BOOL _zoomingAboveOriginalSizeIsEnabled;
<a name="l00065"></a>00065
<a name="l00066"></a>00066 <span class="comment">// State Information</span>
<a name="l00067"></a>00067 NSInteger _firstVisiblePageIndexBeforeRotation;
<a name="l00068"></a>00068 CGFloat _percentScrolledIntoFirstVisiblePage;
<a name="l00069"></a>00069 BOOL _isModifyingContentOffset;
<a name="l00070"></a>00070 BOOL _isAnimatingToPhoto;
<a name="l00071"></a>00071 NSInteger _centerPhotoIndex;
<a name="l00072"></a>00072
<a name="l00073"></a>00073 <span class="comment">// Cached Data Source Information</span>
<a name="l00074"></a>00074 NSInteger _numberOfPages;
<a name="l00075"></a>00075
<a name="l00076"></a>00076 id<NIPhotoAlbumScrollViewDataSource> _dataSource;
<a name="l00077"></a>00077 id<NIPhotoAlbumScrollViewDelegate> _delegate;
<a name="l00078"></a>00078 }
<a name="l00079"></a>00079
<a name="l00080"></a>00080
<a name="l00081"></a>00081 <span class="preprocessor">#pragma mark Configuring Functionality </span>
<a name="l00092"></a><a class="code" href="interface_n_i_photo_album_scroll_view.html#a2990185ef87b7bb83475119e6f6f73fa">00092</a> <span class="preprocessor">@property (nonatomic, readwrite, assign, getter=isZoomingEnabled) BOOL zoomingIsEnabled;</span>
<a name="l00093"></a>00093 <span class="preprocessor"></span>
<a name="l00101"></a><a class="code" href="interface_n_i_photo_album_scroll_view.html#ae19d7850f86f8bf602daed50758f8d6b">00101</a> <span class="keyword">@property</span> (nonatomic, readwrite, assign, getter=isZoomingAboveOriginalSizeEnabled) BOOL zoomingAboveOriginalSizeIsEnabled;
<a name="l00102"></a>00102
<a name="l00103"></a>00103
<a name="l00104"></a>00104 <span class="preprocessor">#pragma mark Data Source </span>
<a name="l00112"></a><a class="code" href="interface_n_i_photo_album_scroll_view.html#a763ac9859c692caac4232135ce22792d">00112</a> <span class="preprocessor">@property (nonatomic, readwrite, assign) id<NIPhotoAlbumScrollViewDataSource> dataSource;</span>
<a name="l00113"></a>00113 <span class="preprocessor"></span>
<a name="l00123"></a>00123 - (void)reloadData;
<a name="l00124"></a>00124
<a name="l00125"></a>00125
<a name="l00126"></a>00126 <span class="preprocessor">#pragma mark Delegate </span>
<a name="l00133"></a><a class="code" href="interface_n_i_photo_album_scroll_view.html#a992a9408b06190db98f14da4071fe4f4">00133</a> <span class="preprocessor">@property (nonatomic, readwrite, assign) id<NIPhotoAlbumScrollViewDelegate> delegate;</span>
<a name="l00134"></a>00134 <span class="preprocessor"></span>
<a name="l00135"></a>00135
<a name="l00136"></a>00136 <span class="preprocessor">#pragma mark Configuring Presentation </span>
<a name="l00148"></a><a class="code" href="interface_n_i_photo_album_scroll_view.html#a5efc3ce3a183043fe3d6341ae82908cc">00148</a> <span class="preprocessor">@property (nonatomic, readwrite, retain) UIImage* loadingImage;</span>
<a name="l00149"></a>00149 <span class="preprocessor"></span>
<a name="l00157"></a><a class="code" href="interface_n_i_photo_album_scroll_view.html#affaad3ec044e3e8f354271a81d723f19">00157</a> <span class="keyword">@property</span> (nonatomic, readwrite, assign) CGFloat pageHorizontalMargin;
<a name="l00158"></a>00158
<a name="l00159"></a>00159
<a name="l00160"></a>00160 <span class="preprocessor">#pragma mark State </span>
<a name="l00170"></a><a class="code" href="interface_n_i_photo_album_scroll_view.html#a8194b80d5c631a5912c6d105a5000ea7">00170</a> <span class="preprocessor">@property (nonatomic, readwrite, assign) NSInteger centerPhotoIndex;</span>
<a name="l00171"></a>00171 <span class="preprocessor"></span>
<a name="l00175"></a>00175 - (void)setCenterPhotoIndex:(NSInteger)centerPhotoIndex animated:(BOOL)animated;
<a name="l00176"></a>00176
<a name="l00185"></a><a class="code" href="interface_n_i_photo_album_scroll_view.html#aa6f3fca130a6cb8358fde37e33a28fe2">00185</a> <span class="keyword">@property</span> (nonatomic, readonly, assign) NSInteger numberOfPhotos;
<a name="l00186"></a>00186
<a name="l00187"></a>00187
<a name="l00188"></a>00188 <span class="preprocessor">#pragma mark Changing the Visible Photo </span>
<a name="l00193"></a>00193 <span class="preprocessor">- (BOOL)hasNext;</span>
<a name="l00194"></a>00194 <span class="preprocessor"></span>
<a name="l00198"></a>00198 - (BOOL)hasPrevious;
<a name="l00199"></a>00199
<a name="l00203"></a>00203 - (void)moveToNextAnimated:(BOOL)animated;
<a name="l00204"></a>00204
<a name="l00208"></a>00208 - (void)moveToPreviousAnimated:(BOOL)animated;
<a name="l00209"></a>00209
<a name="l00210"></a>00210
<a name="l00211"></a>00211 <span class="preprocessor">#pragma mark Notifying the View of Loaded Photos </span>
<a name="l00223"></a>00223 <span class="preprocessor">- (void)didLoadPhoto: (UIImage *)image</span>
<a name="l00224"></a>00224 <span class="preprocessor"></span> atIndex: (NSInteger)photoIndex
<a name="l00225"></a>00225 photoSize: (NIPhotoScrollViewPhotoSize)photoSize;
<a name="l00226"></a>00226
<a name="l00227"></a>00227
<a name="l00228"></a>00228 <span class="preprocessor">#pragma mark Rotating the Scroll View </span>
<a name="l00236"></a>00236 <span class="preprocessor">- (void)willRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation</span>
<a name="l00237"></a>00237 <span class="preprocessor"></span> duration: (NSTimeInterval)duration;
<a name="l00238"></a>00238
<a name="l00242"></a>00242 - (void)willAnimateRotationToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation
<a name="l00243"></a>00243 duration: (NSTimeInterval)duration;
<a name="l00244"></a>00244
<a name="l00245"></a>00245
<a name="l00246"></a>00246 <span class="keyword">@end</span>
<a name="l00247"></a>00247
<a name="l00248"></a>00248
<a name="l00259"></a><a class="code" href="protocol_n_i_photo_album_scroll_view_data_source-p.html">00259</a> <span class="keyword">@protocol </span><a class="code" href="protocol_n_i_photo_album_scroll_view_data_source-p.html" title="The photo album scroll data source.">NIPhotoAlbumScrollViewDataSource</a> <NSObject>
<a name="l00260"></a>00260
<a name="l00261"></a>00261 <span class="keyword">@required</span>
<a name="l00262"></a>00262
<a name="l00263"></a>00263
<a name="l00264"></a>00264 <span class="preprocessor">#pragma mark Fetching Required Album Information </span>
<a name="l00272"></a>00272 <span class="preprocessor">- (NSInteger)numberOfPhotosInPhotoScrollView:(NIPhotoAlbumScrollView *)photoScrollView;</span>
<a name="l00273"></a>00273 <span class="preprocessor"></span>
<a name="l00303"></a>00303 - (UIImage *)photoAlbumScrollView: (<a class="code" href="interface_n_i_photo_album_scroll_view.html" title="A paged scroll view that shows a collection of photos.">NIPhotoAlbumScrollView</a> *)photoAlbumScrollView
<a name="l00304"></a>00304 photoAtIndex: (NSInteger)photoIndex
<a name="l00305"></a>00305 photoSize: (NIPhotoScrollViewPhotoSize *)photoSize
<a name="l00306"></a>00306 isLoading: (BOOL *)isLoading
<a name="l00307"></a>00307 originalPhotoDimensions: (CGSize *)originalPhotoDimensions;
<a name="l00308"></a>00308
<a name="l00309"></a>00309
<a name="l00310"></a>00310 <span class="keyword">@optional</span>
<a name="l00311"></a>00311
<a name="l00312"></a>00312
<a name="l00313"></a>00313 <span class="preprocessor">#pragma mark Optimizing Data Retrieval </span>
<a name="l00324"></a>00324 <span class="preprocessor">- (void)photoAlbumScrollView: (NIPhotoAlbumScrollView *)photoAlbumScrollView</span>
<a name="l00325"></a>00325 <span class="preprocessor"></span> stopLoadingPhotoAtIndex: (NSInteger)photoIndex;
<a name="l00326"></a>00326
<a name="l00327"></a>00327
<a name="l00328"></a>00328 <span class="keyword">@end</span>
<a name="l00329"></a>00329
<a name="l00330"></a>00330
<a name="l00337"></a><a class="code" href="protocol_n_i_photo_album_scroll_view_delegate-p.html">00337</a> <span class="keyword">@protocol </span><a class="code" href="protocol_n_i_photo_album_scroll_view_delegate-p.html" title="The photo album scroll view delegate.">NIPhotoAlbumScrollViewDelegate</a> <NSObject>
<a name="l00338"></a>00338
<a name="l00339"></a>00339 <span class="keyword">@optional</span>
<a name="l00340"></a>00340
<a name="l00341"></a>00341 <span class="preprocessor">#pragma mark Scrolling and Zooming </span>
<a name="l00346"></a>00346 <span class="preprocessor">- (void)photoAlbumScrollViewDidScroll:(NIPhotoAlbumScrollView *)photoAlbumScrollView;</span>
<a name="l00347"></a>00347 <span class="preprocessor"></span>
<a name="l00351"></a>00351 - (void)photoAlbumScrollView: (<a class="code" href="interface_n_i_photo_album_scroll_view.html" title="A paged scroll view that shows a collection of photos.">NIPhotoAlbumScrollView</a> *)photoAlbumScrollView
<a name="l00352"></a>00352 didZoomIn: (BOOL)didZoomIn;
<a name="l00353"></a>00353
<a name="l00354"></a>00354
<a name="l00355"></a>00355 <span class="preprocessor">#pragma mark Changing Pages </span>
<a name="l00362"></a>00362 <span class="preprocessor">- (void)photoAlbumScrollViewDidChangePages:(NIPhotoAlbumScrollView *)photoAlbumScrollView;</span>
<a name="l00363"></a>00363 <span class="preprocessor"></span>
<a name="l00364"></a>00364
<a name="l00365"></a>00365 <span class="preprocessor">#pragma mark Data Availability </span>
<a name="l00370"></a>00370 <span class="preprocessor">- (void)photoAlbumScrollViewDidLoadNextPhoto:(NIPhotoAlbumScrollView *)photoAlbumScrollView;</span>
<a name="l00371"></a>00371 <span class="preprocessor"></span>
<a name="l00375"></a>00375 - (void)photoAlbumScrollViewDidLoadPreviousPhoto:(<a class="code" href="interface_n_i_photo_album_scroll_view.html" title="A paged scroll view that shows a collection of photos.">NIPhotoAlbumScrollView</a> *)photoAlbumScrollView;
<a name="l00376"></a>00376
<a name="l00377"></a>00377
<a name="l00378"></a>00378 <span class="keyword">@end</span>
</pre></div></div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>NIPhotoAlbumScrollView.h</b> </li>
</div><!-- .fixedwidth -->
<span class="footer">Generated for Nimbus by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4-20110629 </span>
</ul>
</div>
</div> <!-- page -->
</body>
</html>