/
CollectionViewDelegateSlantedLayout.html
178 lines (172 loc) · 8.31 KB
/
CollectionViewDelegateSlantedLayout.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>CollectionViewDelegateSlantedLayout Protocol Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Protocol/CollectionViewDelegateSlantedLayout" class="dashAnchor"></a>
<a title="CollectionViewDelegateSlantedLayout Protocol Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">CollectionViewSlantedLayout Docs</a> (100% documented)</p>
<p class="header-right"><a href="https://github.com/yacir/CollectionViewSlantedLayout"><img src="../img/gh.png"/>View on GitHub</a></p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">CollectionViewSlantedLayout Reference</a>
<img id="carat" src="../img/carat.png" />
CollectionViewDelegateSlantedLayout Protocol Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes.html#/c:@M@CollectionViewSlantedLayout@objc(cs)CollectionViewSlantedCell">CollectionViewSlantedCell</a>
</li>
<li class="nav-group-task">
<a href="../Classes/CollectionViewSlantedLayout.html">CollectionViewSlantedLayout</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/SlantingDirection.html">SlantingDirection</a>
</li>
<li class="nav-group-task">
<a href="../Enums/ZIndexOrder.html">ZIndexOrder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/CollectionViewDelegateSlantedLayout.html">CollectionViewDelegateSlantedLayout</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>CollectionViewDelegateSlantedLayout</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">CollectionViewDelegateSlantedLayout</span><span class="p">:</span> <span class="kt">UICollectionViewDelegate</span></code></pre>
</div>
</div>
<p>The CollectionViewDelegateSlantedLayout protocol defines methods that let you coordinate with a
CollectionViewSlantedLayout object to implement a slanted layout.
The methods of this protocol define the size of items.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<div class="task-name-container">
<a name="/Getting%20the%20Size%20of%20Items"></a>
<a name="//apple_ref/swift/Section/Getting the Size of Items" class="dashAnchor"></a>
<a href="#/Getting%20the%20Size%20of%20Items">
<h3 class="section-name">Getting the Size of Items</h3>
</a>
</div>
<ul>
<li class="item">
<div>
<code>
<a name="/c:@M@CollectionViewSlantedLayout@objc(pl)CollectionViewDelegateSlantedLayout(im)collectionView:layout:sizeForItemAt:"></a>
<a name="//apple_ref/swift/Method/collectionView(_:layout:sizeForItemAt:)" class="dashAnchor"></a>
<a class="token" href="#/c:@M@CollectionViewSlantedLayout@objc(pl)CollectionViewDelegateSlantedLayout(im)collectionView:layout:sizeForItemAt:">collectionView(_:layout:sizeForItemAt:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Asks the delegate for the size of the specified item’s cell.</p>
<p>If you do not implement this method, the slanted layout uses the values in its itemSize property
to set the size of items instead. Your implementation of this method can return a fixed set of
sizes or dynamically adjust the sizes based on the cell’s content.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">@objc</span> <span class="kd">optional</span> <span class="kd">func</span> <span class="nf">collectionView</span><span class="p">(</span><span class="n">_</span> <span class="nv">collectionView</span><span class="p">:</span> <span class="kt">UICollectionView</span><span class="p">,</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>collectionView</em>
</code>
</td>
<td>
<div>
<p>The collection view object displaying the slanted layout.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>collectionViewLayout</em>
</code>
</td>
<td>
<div>
<p>The layout object requesting the information.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>indexPath</em>
</code>
</td>
<td>
<div>
<p>The index path of the item.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The height of the specified item (or it’s width for vertical scrolling direction). The value must be greater than 0.</p>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>© 2018 <a class="link" href="http://yassir.fr" target="_blank" rel="external">Yassir Barchi</a>. All rights reserved. (Last updated: 2018-01-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>