forked from jverkoey/nimbus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
interface_n_i_launcher_view_controller.html
215 lines (187 loc) · 13.5 KB
/
interface_n_i_launcher_view_controller.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
<!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: NILauncherViewController Class Reference</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.6.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('interface_n_i_launcher_view_controller.html','');
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#pub-methods">Methods</a> </div>
<div class="headertitle">
<div class="title">NILauncherViewController Class Reference<div class="ingroups"><a class="el" href="group___launcher-_user-_interface.html">User Interface</a></div></div> </div>
</div>
<div class="contents">
<!-- doxytag: class="NILauncherViewController" --><!-- doxytag: inherits="UIViewController,NILauncherDelegate-p,NILauncherDataSource-p" --><hr/><a name="details" id="details"></a><h2>Overview</h2>
<div class="textblock"><p>A view controller that displays a launcher view and implements its protocols. </p>
<p>This view controller may be used in production, though you'll likely want to subclass it and internalize the loading of the pages. You can also simply use this controller as an example and write a completely new view controller or add the launcher view to an existing view controller if that suits your situation better.</p>
<p>By default this controller implements the numberOfRowsPerPageInLauncherView and numberOfColumnsPerPageInLauncherView methods of the launcher data source. The following values are given depending on the device:</p>
<pre>
iPhone:
Portrait: 3x3 (row by column)
Landscape: 5x2
iPad:
4x5
</pre>
<p>You may choose to allow the launcher to determine the number of icons to be shown on its own. If you choose to do so, make these methods return NILauncherViewDynamic.</p>
<p>By default this controller does not allow the launcher to be shown in landscape mode on the iPhone or iPod touches. This is due largely to the complex nature of handling the different number of icons that can be displayed in each orientation. For example, on the iPhone in portrait with the default grid definitions as noted above, you can see 9 icons, whereas in landscape you can see 10. There are things you can do to make this work, of course, but barring an elegant solution I've elected to disable this functionality by default in this controller.</p>
<div class="image">
<img src="NILauncherViewControllerExample1.png" alt="NILauncherViewControllerExample1.png"/>
<div class="caption">
Example of an NILauncherViewController as seen in the BasicLauncher demo application.</div></div>
<p>Definition at line <a class="el" href="_n_i_launcher_view_controller_8h_source.html#l00067">67</a> of file <a class="el" href="_n_i_launcher_view_controller_8h_source.html">NILauncherViewController.h</a>.</p>
</div><div class="dynheader">
Inheritance diagram for NILauncherViewController:</div>
<div class="dyncontent">
<div class="center">
<img src="interface_n_i_launcher_view_controller.png" usemap="#NILauncherViewController_map" alt=""/>
<map id="NILauncherViewController_map" name="NILauncherViewController_map">
<area href="protocol_n_i_launcher_delegate-p.html" title="The launcher delegate used to inform of state changes and user interactions." alt="<NILauncherDelegate>" shape="rect" coords="0,0,162,24"/>
<area href="protocol_n_i_launcher_data_source-p.html" title="The launcher data source used to populate the view." alt="<NILauncherDataSource>" shape="rect" coords="172,0,334,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Methods</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NSArray * </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_n_i_launcher_view_controller.html#ae6d4791037f7aec351b814ebc0dfad00">pages</a> <span class="suffix">property</span></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5354d4b3a37c6d1909b785cc4be2ac7c"></a><!-- doxytag: member="NILauncherViewController::launcherView:didSelectButton:onPage:atIndex:" ref="a5354d4b3a37c6d1909b785cc4be2ac7c" args="(NILauncherView *launcher,[didSelectButton] UIButton *button,[onPage] NSInteger page,[atIndex] NSInteger index)" -->
(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_n_i_launcher_delegate-p.html#a5354d4b3a37c6d1909b785cc4be2ac7c">launcherView:didSelectButton:onPage:atIndex:</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(CGSize) </td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_n_i_launcher_data_source-p.html#aef59561eb420c3699d5c5b3dbe0cb16d">buttonDimensionsInLauncherView:</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ace9be595b80fb6d52e4d94a550748f54"></a><!-- doxytag: member="NILauncherViewController::numberOfRowsPerPageInLauncherView:" ref="ace9be595b80fb6d52e4d94a550748f54" args="(NILauncherView *launcherView)" -->
(NSInteger) </td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_n_i_launcher_data_source-p.html#ace9be595b80fb6d52e4d94a550748f54">numberOfRowsPerPageInLauncherView:</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acfc94919beaa588ef131d9d7beecf7f9"></a><!-- doxytag: member="NILauncherViewController::numberOfColumnsPerPageInLauncherView:" ref="acfc94919beaa588ef131d9d7beecf7f9" args="(NILauncherView *launcherView)" -->
(NSInteger) </td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_n_i_launcher_data_source-p.html#acfc94919beaa588ef131d9d7beecf7f9">numberOfColumnsPerPageInLauncherView:</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7386f18ee064778a4808a26a3cf06f41"></a><!-- doxytag: member="NILauncherViewController::numberOfPagesInLauncherView:" ref="a7386f18ee064778a4808a26a3cf06f41" args="(NILauncherView *launcherView)" -->
(NSInteger) </td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_n_i_launcher_data_source-p.html#a7386f18ee064778a4808a26a3cf06f41">numberOfPagesInLauncherView:</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad330b76b58eebe5dde7b7f7495575e2a"></a><!-- doxytag: member="NILauncherViewController::launcherView:numberOfButtonsInPage:" ref="ad330b76b58eebe5dde7b7f7495575e2a" args="(NILauncherView *launcherView,[numberOfButtonsInPage] NSInteger page)" -->
(NSInteger) </td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_n_i_launcher_data_source-p.html#ad330b76b58eebe5dde7b7f7495575e2a">launcherView:numberOfButtonsInPage:</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2da5ac9e819e16c7ca4410a0497bf2ee"></a><!-- doxytag: member="NILauncherViewController::launcherView:buttonForPage:atIndex:" ref="a2da5ac9e819e16c7ca4410a0497bf2ee" args="(NILauncherView *launcherView,[buttonForPage] NSInteger page,[atIndex] NSInteger index)" -->
(UIButton *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_n_i_launcher_data_source-p.html#a2da5ac9e819e16c7ca4410a0497bf2ee">launcherView:buttonForPage:atIndex:</a></td></tr>
<tr><td colspan="2"><div class="groupHeader">Subclassing</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>The following methods are provided to aid in subclassing and are not meant to be used externally. </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">(Class) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_i_launcher_view_controller.html#a21629435d3eea13bb429361dae2ac0b5">launcherButtonClass</a></td></tr>
</table>
<hr/><h2>Method Documentation</h2>
<a class="anchor" id="ae6d4791037f7aec351b814ebc0dfad00"></a><!-- doxytag: member="NILauncherViewController::pages" ref="ae6d4791037f7aec351b814ebc0dfad00" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSArray *) pages<code> [read, write, copy]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>An array of arrays of <a class="el" href="class_n_i_launcher_item_details.html" title="A convenience class for managing the data used to create an NILauncherButton.">NILauncherItemDetails</a>. </p>
<p>These pages are used to populate the launcher view via the <a class="el" href="protocol_n_i_launcher_data_source-p.html" title="The launcher data source used to populate the view.">NILauncherDataSource</a> protocol.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This is an NSArray - not an NSMutableArray - because you should not directly modify the contents of the pages after they have been stored in this view controller. If you need to modify the pages after assigning them here, you should assign a new set of pages. </dd></dl>
<p>Definition at line <a class="el" href="_n_i_launcher_view_controller_8h_source.html#l00086">86</a> of file <a class="el" href="_n_i_launcher_view_controller_8h_source.html">NILauncherViewController.h</a>.</p>
</div>
</div>
<a class="anchor" id="a21629435d3eea13bb429361dae2ac0b5"></a><!-- doxytag: member="NILauncherViewController::launcherButtonClass" ref="a21629435d3eea13bb429361dae2ac0b5" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (Class) launcherButtonClass </td>
<td></td>
<td class="paramname"></td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The launcher button view class. </p>
<p>Must be a subclass of UIButton.</p>
<p>Provided here for subclasses to use as a convenience for changing the launcher button class.</p>
<p>Defaults to <a class="el" href="class_n_i_launcher_button.html" title="A simple launcher button that shows an image and text.">NILauncherButton</a>. </p>
<p>Definition at line <a class="el" href="_n_i_launcher_view_controller_8m_source.html#l00165">165</a> of file <a class="el" href="_n_i_launcher_view_controller_8m_source.html">NILauncherViewController.m</a>.</p>
</div>
</div>
<a class="anchor" id="aef59561eb420c3699d5c5b3dbe0cb16d"></a><!-- doxytag: member="NILauncherViewController::buttonDimensionsInLauncherView:" ref="aef59561eb420c3699d5c5b3dbe0cb16d" args="(NILauncherView *launcherView)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (CGSize) buttonDimensionsInLauncherView: </td>
<td></td>
<td class="paramtype">(<a class="el" href="interface_n_i_launcher_view.html">NILauncherView</a> *) </td>
<td class="paramname"><em>launcherView</em></td>
<td><code> [optional, inherited]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Override the default button dimensions 80x80. </p>
<p>The default dimensions will fit the following grids:</p>
<p>iPhone within a navigation controller Portrait: 3x4 Landscape: 5x2</p>
<p>The returned dimensions must be positive non-zero values. </p>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="interface_n_i_launcher_view_controller.html">NILauncherViewController</a> </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>