/
group___common-_metrics.html
334 lines (288 loc) · 15.5 KB
/
group___common-_metrics.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
<!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: Common Metrics</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.9.2 - <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('group___common-_metrics.html','');
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Common Metrics</div> </div>
<div class="ingroups"><a class="el" href="group___nimbus_core.html">Nimbus Core</a></div></div>
<div class="contents">
<hr/><a name="details" id="details"></a><h2>Overview</h2>
<p>For common system metrics. </p>
<p>If you ever need to work with system metrics in any way it can be a pain in the ass to try to figure out what the exact metrics are. Figuring out how long it takes the status bar to animate is not something you should be spending your time on. The metrics in this file are provided as a means of unifying a number of system metrics for use in your applications.</p>
<h2>What Qualifies as a Common Metric</h2>
<p>Common metrics are related to system components, such as the dimensions of a toolbar in a particular orientation or the duration of a standard animation. This is not the place to put feature-specific metrics, such as the height of a photo scrubber view.</p>
<h2>Examples</h2>
<h3>Positioning a Toolbar</h3>
<p>The following example updates the position and height of a toolbar when the device orientation is changing. This ensures that, in landscape mode on the iPhone, the toolbar is slightly shorter to accomodate the smaller height of the screen.</p>
<div class="fragment"><pre class="fragment"> - (void)willAnimateRotationToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation
duration: (NSTimeInterval)duration {
[super willAnimateRotationToInterfaceOrientation: toInterfaceOrientation
duration: duration];
CGRect toolbarFrame = <span class="keyword">self</span>.toolbar.frame;
toolbarFrame.size.height = <a class="code" href="group___common-_metrics.html#gae2ad00b094918f5b5929b3520007551b" title="Fetch the height of a toolbar in a given orientation.">NIToolbarHeightForOrientation</a>(toInterfaceOrientation);
toolbarFrame.origin.y = <span class="keyword">self</span>.view.bounds.size.height - toolbarFrame.size.height;
<span class="keyword">self</span>.toolbar.frame = toolbarFrame;
}
</pre></div> <table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">CGFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="group___common-_metrics.html#gae2ad00b094918f5b5929b3520007551b">NIToolbarHeightForOrientation</a> (UIInterfaceOrientation orientation)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">UIViewAnimationCurve </td><td class="memItemRight" valign="bottom"><a class="el" href="group___common-_metrics.html#ga4d89d2266bfbfb0bb5743cfbba210dfe">NIStatusBarAnimationCurve</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NSTimeInterval </td><td class="memItemRight" valign="bottom"><a class="el" href="group___common-_metrics.html#ga6794a4a04b97cd3ffaeac318b7d27b4f">NIStatusBarAnimationDuration</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">UIViewAnimationCurve </td><td class="memItemRight" valign="bottom"><a class="el" href="group___common-_metrics.html#ga2d72a62ebc7f5ec053e60547b2f3e91f">NIStatusBarBoundsChangeAnimationCurve</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NSTimeInterval </td><td class="memItemRight" valign="bottom"><a class="el" href="group___common-_metrics.html#ga9526db6e49bdbeea5f4293d63dded111">NIStatusBarBoundsChangeAnimationDuration</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">CGFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="group___common-_metrics.html#ga2e9bd96c79383760a4b81539339960fb">NIStatusBarHeight</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NSTimeInterval </td><td class="memItemRight" valign="bottom"><a class="el" href="group___common-_metrics.html#ga7d4ebd335b7563adf1b1e5fdcbb6d9d3">NIDeviceRotationDuration</a> (BOOL isFlippingUpsideDown)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">UIEdgeInsets </td><td class="memItemRight" valign="bottom"><a class="el" href="group___common-_metrics.html#ga5224edb22eb775228169b74b11ecb8f6">NICellContentPadding</a> (void)</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gae2ad00b094918f5b5929b3520007551b"></a><!-- doxytag: member="NICommonMetrics.h::NIToolbarHeightForOrientation" ref="gae2ad00b094918f5b5929b3520007551b" args="(UIInterfaceOrientation orientation)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">CGFloat NIToolbarHeightForOrientation </td>
<td>(</td>
<td class="paramtype">UIInterfaceOrientation </td>
<td class="paramname"><em>orientation</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Fetch the height of a toolbar in a given orientation. </p>
<p>On the iPhone:</p>
<ul>
<li>Portrait: 44</li>
<li>Landscape: 33</li>
</ul>
<p>On the iPad: always 44 </p>
<p>Definition at line <a class="el" href="_n_i_common_metrics_8m_source.html#l00023">23</a> of file <a class="el" href="_n_i_common_metrics_8m_source.html">NICommonMetrics.m</a>.</p>
</div>
</div>
<a class="anchor" id="ga4d89d2266bfbfb0bb5743cfbba210dfe"></a><!-- doxytag: member="NICommonMetrics.h::NIStatusBarAnimationCurve" ref="ga4d89d2266bfbfb0bb5743cfbba210dfe" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UIViewAnimationCurve NIStatusBarAnimationCurve </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The animation curve used when changing the status bar's visibility. </p>
<p>This is the curve of the animation used by <code>-[[UIApplication sharedApplication] setStatusBarHidden:withAnimation:].</code></p>
<p>Value: UIViewAnimationCurveEaseIn </p>
<p>Definition at line <a class="el" href="_n_i_common_metrics_8m_source.html#l00033">33</a> of file <a class="el" href="_n_i_common_metrics_8m_source.html">NICommonMetrics.m</a>.</p>
</div>
</div>
<a class="anchor" id="ga6794a4a04b97cd3ffaeac318b7d27b4f"></a><!-- doxytag: member="NICommonMetrics.h::NIStatusBarAnimationDuration" ref="ga6794a4a04b97cd3ffaeac318b7d27b4f" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NSTimeInterval NIStatusBarAnimationDuration </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The animation duration used when changing the status bar's visibility. </p>
<p>This is the duration of the animation used by <code>-[[UIApplication sharedApplication] setStatusBarHidden:withAnimation:].</code></p>
<p>Value: 0.3 seconds </p>
<p>Definition at line <a class="el" href="_n_i_common_metrics_8m_source.html#l00039">39</a> of file <a class="el" href="_n_i_common_metrics_8m_source.html">NICommonMetrics.m</a>.</p>
</div>
</div>
<a class="anchor" id="ga2d72a62ebc7f5ec053e60547b2f3e91f"></a><!-- doxytag: member="NICommonMetrics.h::NIStatusBarBoundsChangeAnimationCurve" ref="ga2d72a62ebc7f5ec053e60547b2f3e91f" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UIViewAnimationCurve NIStatusBarBoundsChangeAnimationCurve </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The animation curve used when the status bar's bounds change (when a call is received, for example). </p>
<p>Value: UIViewAnimationCurveEaseInOut </p>
<p>Definition at line <a class="el" href="_n_i_common_metrics_8m_source.html#l00045">45</a> of file <a class="el" href="_n_i_common_metrics_8m_source.html">NICommonMetrics.m</a>.</p>
</div>
</div>
<a class="anchor" id="ga9526db6e49bdbeea5f4293d63dded111"></a><!-- doxytag: member="NICommonMetrics.h::NIStatusBarBoundsChangeAnimationDuration" ref="ga9526db6e49bdbeea5f4293d63dded111" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NSTimeInterval NIStatusBarBoundsChangeAnimationDuration </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The animation duration used when the status bar's bounds change (when a call is received, for example). </p>
<p>Value: 0.35 seconds </p>
<p>Definition at line <a class="el" href="_n_i_common_metrics_8m_source.html#l00051">51</a> of file <a class="el" href="_n_i_common_metrics_8m_source.html">NICommonMetrics.m</a>.</p>
</div>
</div>
<a class="anchor" id="ga2e9bd96c79383760a4b81539339960fb"></a><!-- doxytag: member="NICommonMetrics.h::NIStatusBarHeight" ref="ga2e9bd96c79383760a4b81539339960fb" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">CGFloat NIStatusBarHeight </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the status bar's current height. </p>
<p>If the status bar is hidden this will return 0.</p>
<p>This is generally 20 when the status bar is its normal height. </p>
<p>Definition at line <a class="el" href="_n_i_common_metrics_8m_source.html#l00057">57</a> of file <a class="el" href="_n_i_common_metrics_8m_source.html">NICommonMetrics.m</a>.</p>
</div>
</div>
<a class="anchor" id="ga7d4ebd335b7563adf1b1e5fdcbb6d9d3"></a><!-- doxytag: member="NICommonMetrics.h::NIDeviceRotationDuration" ref="ga7d4ebd335b7563adf1b1e5fdcbb6d9d3" args="(BOOL isFlippingUpsideDown)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NSTimeInterval NIDeviceRotationDuration </td>
<td>(</td>
<td class="paramtype">BOOL </td>
<td class="paramname"><em>isFlippingUpsideDown</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The animation duration when the device is rotating to a new orientation. </p>
<p>Value: 0.4 seconds if the device is being rotated 90 degrees. 0.8 seconds if the device is being rotated 180 degrees.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">isFlippingUpsideDown</td><td>YES if the device is being flipped upside down. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_n_i_common_metrics_8m_source.html#l00069">69</a> of file <a class="el" href="_n_i_common_metrics_8m_source.html">NICommonMetrics.m</a>.</p>
</div>
</div>
<a class="anchor" id="ga5224edb22eb775228169b74b11ecb8f6"></a><!-- doxytag: member="NICommonMetrics.h::NICellContentPadding" ref="ga5224edb22eb775228169b74b11ecb8f6" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UIEdgeInsets NICellContentPadding </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The padding around a standard cell in a table view. </p>
<p>Value: 10 pixels on all sides. </p>
<p>Definition at line <a class="el" href="_n_i_common_metrics_8m_source.html#l00075">75</a> of file <a class="el" href="_n_i_common_metrics_8m_source.html">NICommonMetrics.m</a>.</p>
</div>
</div>
<div id="disqus_thread"></div></div>
</div>
<div id="nav-path" class="navpath">
<ul>
</div><!-- .fixedwidth -->
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'nimbusdocumentation'; // required: replace example with your forum shortname
// The following are highly recommended additional parameters. Remove the slashes in front to use.
// var disqus_identifier = 'unique_dynamic_id_1234';
// var disqus_url = 'http://example.com/permalink-to-page.html';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<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>