-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNIMutableCollectionViewModel.html
415 lines (389 loc) · 23.3 KB
/
NIMutableCollectionViewModel.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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
<!-- HTML header for doxygen 1.8.6-->
<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6-nimbuskit"/>
<title>NimbusKit: NIMutableCollectionViewModel Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="appledocs.css" rel="stylesheet" type="text/css"/>
<link href="nimbuskit.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-24278774-1']);
_gaq.push(['_setDomainName', 'nimbuskit.info']);
_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="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<a href="index.html"><img style="float:left" src="nimbus128.png" width="80" height="80" /></a>
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">NimbusKit
 <span id="projectnumber">1.2.1 - <a href="http://github.com/jverkoey/nimbus">Fork Nimbus on Github</a> - <a href="http://wiki.nimbuskit.info/">Visit the Nimbus Wiki</a></span>
</div>
<div id="projectbrief">The iOS framework that grows only as fast as its documentation</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6-nimbuskit -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('NIMutableCollectionViewModel.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="classNIMutableCollectionViewModel-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">NIMutableCollectionViewModel Class Reference<div class="ingroups"><a class="el" href="TableViewModels.html">Table View Models</a></div></div> </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>The <a class="el" href="NIMutableCollectionViewModel.html" title="The NIMutableCollectionViewModel class is a mutable collection view model. ">NIMutableCollectionViewModel</a> class is a mutable collection view model. </p>
<p>When modifications are made to the model there are two ways to reflect the changes in the collection view.</p>
<ul>
<li>Call reloadData on the collection view. This is the most destructive way to update the collection view.</li>
<li>Call insert/delete/reload methods on the collection view with the retuned index path arrays.</li>
</ul>
<p>The latter option is the recommended approach to adding new cells to a collection view. Each method in the mutable collection view model returns a data structure that can be used to inform the collection view of the exact modifications that have been made to the model.</p>
<p>Example of adding a new section: </p>
<div class="fragment"><div class="line"><span class="comment">// Appends a new section to the end of the model.</span></div>
<div class="line">NSIndexSet* indexSet = [<span class="keyword">self</span>.model addSectionWithTitle:<span class="stringliteral">@"New section"</span>];</div>
<div class="line"></div>
<div class="line"><span class="comment">// Appends a cell to the last section in the model (in this case, the new section we just created).</span></div>
<div class="line">[<span class="keyword">self</span>.model addObject:[TestTextCollectionViewCellObject objectWithTitle:<span class="stringliteral">@"A cell"</span>]];</div>
<div class="line"></div>
<div class="line"><span class="comment">// Inform the collection view that we've modified the model.</span></div>
<div class="line">[<span class="keyword">self</span>.collectionView insertSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];</div>
</div><!-- fragment --> </div><div class="dynheader">
Inheritance diagram for NIMutableCollectionViewModel:</div>
<div class="dyncontent">
<div class="center">
<img src="NIMutableCollectionViewModel.png" usemap="#NIMutableCollectionViewModel_map" alt=""/>
<map id="NIMutableCollectionViewModel_map" name="NIMutableCollectionViewModel_map">
<area href="NICollectionViewModel.html" title="A non-mutable collection view model that complies to the UICollectionViewDataSource protocol..." alt="NICollectionViewModel" shape="rect" coords="0,0,188,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Tasks</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Modifying Objects</div></td></tr>
<tr class="memitem:addObject:"><td class="memItemLeft" align="right" valign="top">(NSArray *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="NIMutableCollectionViewModel.html#addObject:">addObject:</a></td></tr>
<tr class="separator:addObject:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:addObject:toSection:"><td class="memItemLeft" align="right" valign="top">(NSArray *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="NIMutableCollectionViewModel.html#addObject:toSection:">addObject:toSection:</a></td></tr>
<tr class="separator:addObject:toSection:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:addObjectsFromArray:"><td class="memItemLeft" align="right" valign="top">(NSArray *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="NIMutableCollectionViewModel.html#addObjectsFromArray:">addObjectsFromArray:</a></td></tr>
<tr class="separator:addObjectsFromArray:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:insertObject:atRow:inSection:"><td class="memItemLeft" align="right" valign="top">(NSArray *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="NIMutableCollectionViewModel.html#insertObject:atRow:inSection:">insertObject:atRow:inSection:</a></td></tr>
<tr class="separator:insertObject:atRow:inSection:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:removeObjectAtIndexPath:"><td class="memItemLeft" align="right" valign="top">(NSArray *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="NIMutableCollectionViewModel.html#removeObjectAtIndexPath:">removeObjectAtIndexPath:</a></td></tr>
<tr class="separator:removeObjectAtIndexPath:"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Modifying Sections</div></td></tr>
<tr class="memitem:addSectionWithTitle:"><td class="memItemLeft" align="right" valign="top">(NSIndexSet *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="NIMutableCollectionViewModel.html#addSectionWithTitle:">addSectionWithTitle:</a></td></tr>
<tr class="separator:addSectionWithTitle:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:insertSectionWithTitle:atIndex:"><td class="memItemLeft" align="right" valign="top">(NSIndexSet *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="NIMutableCollectionViewModel.html#insertSectionWithTitle:atIndex:">insertSectionWithTitle:atIndex:</a></td></tr>
<tr class="separator:insertSectionWithTitle:atIndex:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:removeSectionAtIndex:"><td class="memItemLeft" align="right" valign="top">(NSIndexSet *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="NIMutableCollectionViewModel.html#removeSectionAtIndex:">removeSectionAtIndex:</a></td></tr>
<tr class="separator:removeSectionAtIndex:"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Creating Collection View Cells</div></td></tr>
<tr class="memitem:delegate"><td class="memItemLeft" align="right" valign="top">id< <a class="el" href="NICollectionViewModelDelegate-Protocol.html">NICollectionViewModelDelegate</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="NICollectionViewModel.html#delegate">delegate</a> <span class="suffix">property</span></td></tr>
<tr class="separator:delegate"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Creating Collection View Models</div></td></tr>
<tr class="memitem:initWithDelegate:"><td class="memItemLeft" align="right" valign="top">(id) </td><td class="memItemRight" valign="bottom">- <a class="el" href="NICollectionViewModel.html#initWithDelegate:">initWithDelegate:</a></td></tr>
<tr class="separator:initWithDelegate:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:initWithListArray:delegate:"><td class="memItemLeft" align="right" valign="top">(id) </td><td class="memItemRight" valign="bottom">- <a class="el" href="NICollectionViewModel.html#initWithListArray:delegate:">initWithListArray:delegate:</a></td></tr>
<tr class="separator:initWithListArray:delegate:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:initWithSectionedArray:delegate:"><td class="memItemLeft" align="right" valign="top">(id) </td><td class="memItemRight" valign="bottom">- <a class="el" href="NICollectionViewModel.html#initWithSectionedArray:delegate:">initWithSectionedArray:delegate:</a></td></tr>
<tr class="separator:initWithSectionedArray:delegate:"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Accessing Objects</div></td></tr>
<tr class="memitem:objectAtIndexPath:"><td class="memItemLeft" align="right" valign="top">(id) </td><td class="memItemRight" valign="bottom">- <a class="el" href="NICollectionViewModel.html#objectAtIndexPath:">objectAtIndexPath:</a></td></tr>
<tr class="separator:objectAtIndexPath:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:indexPathForObject:"><td class="memItemLeft" align="right" valign="top">(NSIndexPath *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="NICollectionViewModel.html#indexPathForObject:">indexPathForObject:</a></td></tr>
<tr class="separator:indexPathForObject:"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Method Documentation</h2>
<a class="anchor" id="addObject:"></a>
<div class="memitem">
<h3 class="memname">addObject:</h3>
<div class="memdoc">
<p class="abstract">Appends an object to the last section. </p>
<div class="declaration">
- (NSArray*)addObject:(id)object;</td></tr>
</div>
<h5>Discussion</h5>
<p>If no sections exist, a section will be created without a title and the object will be added to this new section.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">object</td><td>The object to append to the last section. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array with a single NSIndexPath representing the index path of the new object in the model. </dd></dl>
</div>
</div>
<a class="anchor" id="addObject:toSection:"></a>
<div class="memitem">
<h3 class="memname">addObject:toSection:</h3>
<div class="memdoc">
<p class="abstract">Appends an object to the end of the given section. </p>
<div class="declaration">
- (NSArray*)addObject:(id)object toSection:(NSUInteger)section;</td></tr>
</div>
<h5>Discussion</h5>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">object</td><td>The object to append to the section. </td></tr>
<tr><td class="paramname">section</td><td>The index of the section to which this object should be appended. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array with a single NSIndexPath representing the index path of the new object in the model. </dd></dl>
</div>
</div>
<a class="anchor" id="addObjectsFromArray:"></a>
<div class="memitem">
<h3 class="memname">addObjectsFromArray:</h3>
<div class="memdoc">
<p class="abstract">Appends an array of objects to the last section. </p>
<div class="declaration">
- (NSArray*)addObjectsFromArray:(NSArray *)array;</td></tr>
</div>
<h5>Discussion</h5>
<p>If no section exists, a section will be created without a title and the objects will be added to this new section.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">array</td><td>The array of objects to append to the last section. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array of NSIndexPath objects representing the index paths of the objects in the model. </dd></dl>
</div>
</div>
<a class="anchor" id="insertObject:atRow:inSection:"></a>
<div class="memitem">
<h3 class="memname">insertObject:atRow:inSection:</h3>
<div class="memdoc">
<p class="abstract">Inserts an object into the given section at the given row. </p>
<div class="declaration">
- (NSArray*)insertObject:(id)object atRow:(NSUInteger)row inSection:(NSUInteger)section;</td></tr>
</div>
<h5>Discussion</h5>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">object</td><td>The object to append to the section. </td></tr>
<tr><td class="paramname">row</td><td>The row within the section at which to insert the object. </td></tr>
<tr><td class="paramname">section</td><td>The index of the section in which the object should be inserted. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array with a single NSIndexPath representing the index path of the new object in the model. </dd></dl>
</div>
</div>
<a class="anchor" id="removeObjectAtIndexPath:"></a>
<div class="memitem">
<h3 class="memname">removeObjectAtIndexPath:</h3>
<div class="memdoc">
<p class="abstract">Removes an object at the given index path. </p>
<div class="declaration">
- (NSArray*)removeObjectAtIndexPath:(NSIndexPath *)indexPath;</td></tr>
</div>
<h5>Discussion</h5>
<p>If the index path does not represent a valid object then a debug assertion will fire and the method will return nil without removing any object.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">indexPath</td><td>The index path at which to remove a single object. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array with a single NSIndexPath representing the index path of the object that was removed from the model, or nil if no object exists at the given index path. </dd></dl>
</div>
</div>
<a class="anchor" id="addSectionWithTitle:"></a>
<div class="memitem">
<h3 class="memname">addSectionWithTitle:</h3>
<div class="memdoc">
<p class="abstract">Appends a section with a given title to the model. </p>
<div class="declaration">
- (NSIndexSet*)addSectionWithTitle:(NSString *)title;</td></tr>
</div>
<h5>Discussion</h5>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">title</td><td>The title of the new section. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An index set with a single index representing the index of the new section. </dd></dl>
</div>
</div>
<a class="anchor" id="insertSectionWithTitle:atIndex:"></a>
<div class="memitem">
<h3 class="memname">insertSectionWithTitle:atIndex:</h3>
<div class="memdoc">
<p class="abstract">Inserts a section with a given title to the model at the given index. </p>
<div class="declaration">
- (NSIndexSet*)insertSectionWithTitle:(NSString *)title atIndex:(NSUInteger)index;</td></tr>
</div>
<h5>Discussion</h5>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">title</td><td>The title of the new section. </td></tr>
<tr><td class="paramname">index</td><td>The index in the model at which to add the new section. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An index set with a single index representing the index of the new section. </dd></dl>
</div>
</div>
<a class="anchor" id="removeSectionAtIndex:"></a>
<div class="memitem">
<h3 class="memname">removeSectionAtIndex:</h3>
<div class="memdoc">
<p class="abstract">Removes a section at the given index. </p>
<div class="declaration">
- (NSIndexSet*)removeSectionAtIndex:(NSUInteger)index;</td></tr>
</div>
<h5>Discussion</h5>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">index</td><td>The index in the model of the section to remove. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An index set with a single index representing the index of the removed section. </dd></dl>
</div>
</div>
<a class="anchor" id="delegate"></a>
<div class="memitem">
<h3 class="memname">delegate</h3>
<div class="memdoc">
<p class="abstract">A delegate used to fetch collection view cells for the data source. </p>
<div class="declaration">
@property (nonatomic, weak) id<<a class="el" href="NICollectionViewModelDelegate-Protocol.html">NICollectionViewModelDelegate</a>> delegate;</td></tr>
</div>
</div>
</div>
<a class="anchor" id="initWithDelegate:"></a>
<div class="memitem">
<h3 class="memname">initWithDelegate:</h3>
<div class="memdoc">
<p class="abstract">Initializes a newly allocated static model with the given delegate and empty contents. </p>
<div class="declaration">
- (id)initWithDelegate:(id<<a class="el" href="NICollectionViewModelDelegate-Protocol.html">NICollectionViewModelDelegate</a>>)delegate;</td></tr>
</div>
<h5>Discussion</h5>
<p>This method can be used to create an empty model. </p>
</div>
</div>
<a class="anchor" id="initWithListArray:delegate:"></a>
<div class="memitem">
<h3 class="memname">initWithListArray:delegate:</h3>
<div class="memdoc">
<p class="abstract">Initializes a newly allocated static model with the contents of a list array. </p>
<div class="declaration">
- (id)initWithListArray:(NSArray *)listArray delegate:(id<<a class="el" href="NICollectionViewModelDelegate-Protocol.html">NICollectionViewModelDelegate</a>>)delegate;</td></tr>
</div>
<h5>Discussion</h5>
<p>A list array is a one-dimensional array that defines a flat list of rows. There will be no sectioning of contents in any way.</p>
<h3>Example</h3>
<div class="fragment"><div class="line">NSArray* contents =</div>
<div class="line">[NSArray arrayWithObjects:</div>
<div class="line"> [NSDictionary dictionaryWithObject:<span class="stringliteral">@"Row 1"</span> forKey:<span class="stringliteral">@"title"</span>],</div>
<div class="line"> [NSDictionary dictionaryWithObject:<span class="stringliteral">@"Row 2"</span> forKey:<span class="stringliteral">@"title"</span>],</div>
<div class="line"> [NSDictionary dictionaryWithObject:<span class="stringliteral">@"Row 3"</span> forKey:<span class="stringliteral">@"title"</span>],</div>
<div class="line"> nil];</div>
<div class="line">[[<a class="code" href="NICollectionViewModel.html">NICollectionViewModel</a> alloc] initWithListArray:contents delegate:<span class="keyword">self</span>];</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="initWithSectionedArray:delegate:"></a>
<div class="memitem">
<h3 class="memname">initWithSectionedArray:delegate:</h3>
<div class="memdoc">
<p class="abstract">Initializes a newly allocated static model with the contents of a sectioned array. </p>
<div class="declaration">
- (id)initWithSectionedArray:(NSArray *)sectionedArray delegate:(id<<a class="el" href="NICollectionViewModelDelegate-Protocol.html">NICollectionViewModelDelegate</a>>)delegate;</td></tr>
</div>
<h5>Discussion</h5>
<p>A sectioned array is a one-dimensional array that defines a list of sections and each section's contents. Each NSString begins a new section and any other object defines a row for the current section.</p>
<h3>Example</h3>
<div class="fragment"><div class="line">NSArray* contents =</div>
<div class="line">[NSArray arrayWithObjects:</div>
<div class="line"> <span class="stringliteral">@"Section 1"</span>,</div>
<div class="line"> [NSDictionary dictionaryWithObject:<span class="stringliteral">@"Row 1"</span> forKey:<span class="stringliteral">@"title"</span>],</div>
<div class="line"> [NSDictionary dictionaryWithObject:<span class="stringliteral">@"Row 2"</span> forKey:<span class="stringliteral">@"title"</span>],</div>
<div class="line"> <span class="stringliteral">@"Section 2"</span>,</div>
<div class="line"> <span class="comment">// This section is empty.</span></div>
<div class="line"> <span class="stringliteral">@"Section 3"</span>,</div>
<div class="line"> [NSDictionary dictionaryWithObject:<span class="stringliteral">@"Row 3"</span> forKey:<span class="stringliteral">@"title"</span>],</div>
<div class="line"> [<a class="code" href="NICollectionViewModelFooter.html">NICollectionViewModelFooter</a> footerWithTitle:<span class="stringliteral">@"Footer"</span>],</div>
<div class="line"> nil];</div>
<div class="line">[[<a class="code" href="NICollectionViewModel.html">NICollectionViewModel</a> alloc] initWithSectionedArray:contents delegate:<span class="keyword">self</span>];</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="objectAtIndexPath:"></a>
<div class="memitem">
<h3 class="memname">objectAtIndexPath:</h3>
<div class="memdoc">
<p class="abstract">Returns the object at the given index path. </p>
<div class="declaration">
- (id)objectAtIndexPath:(NSIndexPath *)indexPath;</td></tr>
</div>
<h5>Discussion</h5>
<p>If no object exists at the given index path (an invalid index path, for example) then nil will be returned. </p>
</div>
</div>
<a class="anchor" id="indexPathForObject:"></a>
<div class="memitem">
<h3 class="memname">indexPathForObject:</h3>
<div class="memdoc">
<p class="abstract">Returns the index path of the given object within the model. </p>
<div class="declaration">
- (NSIndexPath*)indexPathForObject:(id)object;</td></tr>
</div>
<h5>Discussion</h5>
<p>If the model does not contain the object then nil will be returned. </p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<script type="text/javascript" src="widget.js"></script>
</body>
</html>