Skip to content

Commit 0694885

Browse files
committed
Doc update
1 parent 62bb6ee commit 0694885

File tree

9 files changed

+126
-104
lines changed

9 files changed

+126
-104
lines changed

Documentation/PPRevealSideViewController.docset/Contents/Resources/Documents/Classes/PPRevealSideViewController.html

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -231,59 +231,69 @@ <h2 class="subtitle subtitle-overview">Overview</h2>
231231

232232
<h1>Initializing</h1>
233233

234-
<p><a href="../Classes/MainViewController.html">MainViewController</a> <em>main = [[MainViewController alloc] initWithNibName:@&ldquo;MainViewController&rdquo; bundle:nil];
235-
UINavigationController </em>nav = [[UINavigationController alloc] initWithRootViewController:main];</p>
234+
<pre><code>MainViewController *main = [[MainViewController alloc] initWithNibName:@"MainViewController" bundle:nil];
235+
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:main];
236236

237-
<p>_revealSideViewController = [[PPRevealSideViewController alloc] initWithRootViewController:nav];</p>
237+
_revealSideViewController = [[PPRevealSideViewController alloc] initWithRootViewController:nav];
238238

239-
<p>self.window.<a href="#//api/name/rootViewController">rootViewController</a> = _revealSideViewController;</p>
239+
self.window.rootViewController = _revealSideViewController;
240+
</code></pre>
240241

241242
<h1>Pushing a controller</h1>
242243

243244
<p>You have several <a href="#//api/name/options">options</a> to push a controller. The easiest way is :</p>
244245

245-
<p><a href="../Classes/PopedViewController.html">PopedViewController</a> *c = [[PopedViewController alloc] initWithNibName:@&ldquo;PopedViewController&rdquo; bundle:nil ];
246-
[self.revealSideViewController pushViewController:c onDirection:PPRevealSideDirectionBottom animated:YES];</p>
246+
<pre><code>PopedViewController *c = [[PopedViewController alloc] initWithNibName:@"PopedViewController" bundle:nil ];
247+
[self.revealSideViewController pushViewController:c onDirection:PPRevealSideDirectionBottom animated:YES];
248+
</code></pre>
247249

248250
<p>This will push the controller on bottom, with a default offset.
249251
You have four directions :</p>
250252

251-
<p>PPRevealSideDirectionBottom
253+
<pre><code>PPRevealSideDirectionBottom
252254
PPRevealSideDirectionTop
253255
PPRevealSideDirectionLeft
254-
PPRevealSideDirectionRight</p>
256+
PPRevealSideDirectionRight
257+
</code></pre>
255258

256259
<h1>Popping</h1>
257260

258261
<p>To go back to your center controller from a side controller, you can pop :</p>
259262

260-
<p>[self.revealSideViewController popViewControllerAnimated:YES];</p>
263+
<pre><code>[self.revealSideViewController popViewControllerAnimated:YES];
264+
</code></pre>
261265

262266
<p>If you want to pop a new center controller, then do the following :</p>
263267

264-
<p><a href="../Classes/MainViewController.html">MainViewController</a> <em>c = [[MainViewController alloc] initWithNibName:@&ldquo;MainViewController&rdquo; bundle:nil];
265-
UINavigationController </em>n = [[UINavigationController alloc] initWithRootViewController:c];
266-
[self.revealSideViewController popViewControllerWithNewCenterController:n animated:YES];</p>
268+
<pre><code>MainViewController *c = [[MainViewController alloc] initWithNibName:@"MainViewController" bundle:nil];
269+
UINavigationController *n = [[UINavigationController alloc] initWithRootViewController:c];
270+
[self.revealSideViewController popViewControllerWithNewCenterController:n animated:YES];
271+
</code></pre>
267272

268273
<h1>Pushing from a side</h1>
269274

270275
<p>If you are for example on the up side, and you want to push a controller on the left, you could call a method on your center controller asking him to display a left controller. But I thought it would be more convenient to provide a way to push an old controller directly. So, using the following will do the trick</p>
271276

272-
<p>[self.revealSideViewController pushOldViewControllerOnDirection:PPRevealSideDirectionLeft animated:YES];</p>
277+
<pre><code>[self.revealSideViewController pushOldViewControllerOnDirection:PPRevealSideDirectionLeft animated:YES];
278+
</code></pre>
273279

274280
<p>If you are on top, and you want to push a new controller on top (why not), the default behavior of the controller would be to close the top side since it&rsquo;s open. But you can force it to pop push :</p>
275281

276-
<p>[self.revealSideViewController pushViewController:c onDirection:PPRevealSideDirectionTop animated:YES forceToPopPush:YES];</p>
282+
<pre><code>[self.revealSideViewController pushViewController:c onDirection:PPRevealSideDirectionTop animated:YES forceToPopPush:YES];
283+
</code></pre>
277284

278285
<h1>Note if you don&rsquo;t have controllers for all the sides</h1>
279286

280287
<p>If you want to present only a controller on the left and the right for example, you probably don&rsquo;t want the bouncing animation which shows that there is not yet a controller to present. This animation comes when you do a panning gesture with no preloaded controller, or no controller pushed yet on the triggered side.
281288
In that case, do the following</p>
282289

283-
<p>[self.revealSideViewController setDirectionsToShowBounce:PPRevealSideDirectionLeft | PPRevealSideDirectionRight];</p>
290+
<pre><code>[self.revealSideViewController setDirectionsToShowBounce:PPRevealSideDirectionLeft | PPRevealSideDirectionRight];
291+
</code></pre>
284292

285-
<p>You could also don&rsquo;t want these animations at all. Disabled these like it
286-
[self.revealSideViewController setDirectionsToShowBounce:PPRevealSideDirectionNone];</p>
293+
<p>You could also don&rsquo;t want these animations at all. Disabled these like it</p>
294+
295+
<pre><code>[self.revealSideViewController setDirectionsToShowBounce:PPRevealSideDirectionNone];
296+
</code></pre>
287297
</div>
288298

289299

@@ -1188,20 +1198,19 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
11881198
<h4 class="method-subtitle">Discussion</h4>
11891199
<p>For example, you will use as it, with a performSelector:afterDelay: (because of some interferences with the push/pop methods)</p>
11901200

1191-
<ul>
1192-
<li><p>(void) viewDidAppear:(BOOL)animated {
1193-
[super viewDidAppear:animated];
1194-
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(preloadLeft) object:nil];
1195-
[self performSelector:@selector(preloadLeft) withObject:nil afterDelay:0.3];
1196-
}</p></li>
1197-
<li><p>(void) preloadLeft {
1198-
TableViewController *c = [[TableViewController alloc] initWithStyle:UITableViewStylePlain];
1199-
[self.revealSideViewController preloadViewController:c
1200-
forSide:PPRevealSideDirectionLeft
1201-
withOffset:_offset];
1202-
}</p></li>
1203-
</ul>
1201+
<pre><code>- (void) viewDidAppear:(BOOL)animated {
1202+
[super viewDidAppear:animated];
1203+
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(preloadLeft) object:nil];
1204+
[self performSelector:@selector(preloadLeft) withObject:nil afterDelay:0.3];
1205+
}
12041206

1207+
- (void) preloadLeft {
1208+
TableViewController *c = [[TableViewController alloc] initWithStyle:UITableViewStylePlain];
1209+
[self.revealSideViewController preloadViewController:c
1210+
forSide:PPRevealSideDirectionLeft
1211+
withOffset:_offset];
1212+
}
1213+
</code></pre>
12051214
</div>
12061215

12071216

Documentation/PPRevealSideViewController.docset/Contents/Resources/Documents/Protocols/PPRevealSideViewControllerDelegate.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -468,13 +468,15 @@ <h4 class="method-subtitle parameter-title">Return Value</h4>
468468

469469
<div class="method-subsection discussion-section">
470470
<h4 class="method-subtitle">Discussion</h4>
471-
<p>You could need to deactivate gesture for specific direction on a web view for example. If your web view fits the screen on width, then you probably want to deactivate gestures on top and bottom. In this case, you can do
472-
&ndash; (PPRevealSideDirection)pprevealSideViewController:(<a href="../Classes/PPRevealSideViewController.html">PPRevealSideViewController</a><em>)controller directionsAllowedForPanningOnView:(UIView</em>)view {</p>
471+
<p>You could need to deactivate gesture for specific direction on a web view for example. If your web view fits the screen on width, then you probably want to deactivate gestures on top and bottom. In this case, you can do</p>
473472

474-
<p>if ([view isKindOfClass:NSClassFromString(@&ldquo;UIWebBrowserView&rdquo;)]) return PPRevealSideDirectionLeft | PPRevealSideDirectionRight;</p>
473+
<pre><code>- (PPRevealSideDirection)pprevealSideViewController:(PPRevealSideViewController*)controller directionsAllowedForPanningOnView:(UIView*)view {
475474

476-
<p>return PPRevealSideDirectionLeft | PPRevealSideDirectionRight | PPRevealSideDirectionTop | PPRevealSideDirectionBottom;
477-
}</p>
475+
if ([view isKindOfClass:NSClassFromString(@"UIWebBrowserView")]) return PPRevealSideDirectionLeft | PPRevealSideDirectionRight;
476+
477+
return PPRevealSideDirectionLeft | PPRevealSideDirectionRight | PPRevealSideDirectionTop | PPRevealSideDirectionBottom;
478+
}
479+
</code></pre>
478480
</div>
479481

480482

Binary file not shown.
Binary file not shown.
Binary file not shown.

Documentation/html/Classes/PPRevealSideViewController.html

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -231,59 +231,69 @@ <h2 class="subtitle subtitle-overview">Overview</h2>
231231

232232
<h1>Initializing</h1>
233233

234-
<p><a href="../Classes/MainViewController.html">MainViewController</a> <em>main = [[MainViewController alloc] initWithNibName:@&ldquo;MainViewController&rdquo; bundle:nil];
235-
UINavigationController </em>nav = [[UINavigationController alloc] initWithRootViewController:main];</p>
234+
<pre><code>MainViewController *main = [[MainViewController alloc] initWithNibName:@"MainViewController" bundle:nil];
235+
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:main];
236236

237-
<p>_revealSideViewController = [[PPRevealSideViewController alloc] initWithRootViewController:nav];</p>
237+
_revealSideViewController = [[PPRevealSideViewController alloc] initWithRootViewController:nav];
238238

239-
<p>self.window.<a href="#//api/name/rootViewController">rootViewController</a> = _revealSideViewController;</p>
239+
self.window.rootViewController = _revealSideViewController;
240+
</code></pre>
240241

241242
<h1>Pushing a controller</h1>
242243

243244
<p>You have several <a href="#//api/name/options">options</a> to push a controller. The easiest way is :</p>
244245

245-
<p><a href="../Classes/PopedViewController.html">PopedViewController</a> *c = [[PopedViewController alloc] initWithNibName:@&ldquo;PopedViewController&rdquo; bundle:nil ];
246-
[self.revealSideViewController pushViewController:c onDirection:PPRevealSideDirectionBottom animated:YES];</p>
246+
<pre><code>PopedViewController *c = [[PopedViewController alloc] initWithNibName:@"PopedViewController" bundle:nil ];
247+
[self.revealSideViewController pushViewController:c onDirection:PPRevealSideDirectionBottom animated:YES];
248+
</code></pre>
247249

248250
<p>This will push the controller on bottom, with a default offset.
249251
You have four directions :</p>
250252

251-
<p>PPRevealSideDirectionBottom
253+
<pre><code>PPRevealSideDirectionBottom
252254
PPRevealSideDirectionTop
253255
PPRevealSideDirectionLeft
254-
PPRevealSideDirectionRight</p>
256+
PPRevealSideDirectionRight
257+
</code></pre>
255258

256259
<h1>Popping</h1>
257260

258261
<p>To go back to your center controller from a side controller, you can pop :</p>
259262

260-
<p>[self.revealSideViewController popViewControllerAnimated:YES];</p>
263+
<pre><code>[self.revealSideViewController popViewControllerAnimated:YES];
264+
</code></pre>
261265

262266
<p>If you want to pop a new center controller, then do the following :</p>
263267

264-
<p><a href="../Classes/MainViewController.html">MainViewController</a> <em>c = [[MainViewController alloc] initWithNibName:@&ldquo;MainViewController&rdquo; bundle:nil];
265-
UINavigationController </em>n = [[UINavigationController alloc] initWithRootViewController:c];
266-
[self.revealSideViewController popViewControllerWithNewCenterController:n animated:YES];</p>
268+
<pre><code>MainViewController *c = [[MainViewController alloc] initWithNibName:@"MainViewController" bundle:nil];
269+
UINavigationController *n = [[UINavigationController alloc] initWithRootViewController:c];
270+
[self.revealSideViewController popViewControllerWithNewCenterController:n animated:YES];
271+
</code></pre>
267272

268273
<h1>Pushing from a side</h1>
269274

270275
<p>If you are for example on the up side, and you want to push a controller on the left, you could call a method on your center controller asking him to display a left controller. But I thought it would be more convenient to provide a way to push an old controller directly. So, using the following will do the trick</p>
271276

272-
<p>[self.revealSideViewController pushOldViewControllerOnDirection:PPRevealSideDirectionLeft animated:YES];</p>
277+
<pre><code>[self.revealSideViewController pushOldViewControllerOnDirection:PPRevealSideDirectionLeft animated:YES];
278+
</code></pre>
273279

274280
<p>If you are on top, and you want to push a new controller on top (why not), the default behavior of the controller would be to close the top side since it&rsquo;s open. But you can force it to pop push :</p>
275281

276-
<p>[self.revealSideViewController pushViewController:c onDirection:PPRevealSideDirectionTop animated:YES forceToPopPush:YES];</p>
282+
<pre><code>[self.revealSideViewController pushViewController:c onDirection:PPRevealSideDirectionTop animated:YES forceToPopPush:YES];
283+
</code></pre>
277284

278285
<h1>Note if you don&rsquo;t have controllers for all the sides</h1>
279286

280287
<p>If you want to present only a controller on the left and the right for example, you probably don&rsquo;t want the bouncing animation which shows that there is not yet a controller to present. This animation comes when you do a panning gesture with no preloaded controller, or no controller pushed yet on the triggered side.
281288
In that case, do the following</p>
282289

283-
<p>[self.revealSideViewController setDirectionsToShowBounce:PPRevealSideDirectionLeft | PPRevealSideDirectionRight];</p>
290+
<pre><code>[self.revealSideViewController setDirectionsToShowBounce:PPRevealSideDirectionLeft | PPRevealSideDirectionRight];
291+
</code></pre>
284292

285-
<p>You could also don&rsquo;t want these animations at all. Disabled these like it
286-
[self.revealSideViewController setDirectionsToShowBounce:PPRevealSideDirectionNone];</p>
293+
<p>You could also don&rsquo;t want these animations at all. Disabled these like it</p>
294+
295+
<pre><code>[self.revealSideViewController setDirectionsToShowBounce:PPRevealSideDirectionNone];
296+
</code></pre>
287297
</div>
288298

289299

@@ -1188,20 +1198,19 @@ <h4 class="method-subtitle parameter-title">Parameters</h4>
11881198
<h4 class="method-subtitle">Discussion</h4>
11891199
<p>For example, you will use as it, with a performSelector:afterDelay: (because of some interferences with the push/pop methods)</p>
11901200

1191-
<ul>
1192-
<li><p>(void) viewDidAppear:(BOOL)animated {
1193-
[super viewDidAppear:animated];
1194-
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(preloadLeft) object:nil];
1195-
[self performSelector:@selector(preloadLeft) withObject:nil afterDelay:0.3];
1196-
}</p></li>
1197-
<li><p>(void) preloadLeft {
1198-
TableViewController *c = [[TableViewController alloc] initWithStyle:UITableViewStylePlain];
1199-
[self.revealSideViewController preloadViewController:c
1200-
forSide:PPRevealSideDirectionLeft
1201-
withOffset:_offset];
1202-
}</p></li>
1203-
</ul>
1201+
<pre><code>- (void) viewDidAppear:(BOOL)animated {
1202+
[super viewDidAppear:animated];
1203+
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(preloadLeft) object:nil];
1204+
[self performSelector:@selector(preloadLeft) withObject:nil afterDelay:0.3];
1205+
}
12041206

1207+
- (void) preloadLeft {
1208+
TableViewController *c = [[TableViewController alloc] initWithStyle:UITableViewStylePlain];
1209+
[self.revealSideViewController preloadViewController:c
1210+
forSide:PPRevealSideDirectionLeft
1211+
withOffset:_offset];
1212+
}
1213+
</code></pre>
12051214
</div>
12061215

12071216

Documentation/html/Protocols/PPRevealSideViewControllerDelegate.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -468,13 +468,15 @@ <h4 class="method-subtitle parameter-title">Return Value</h4>
468468

469469
<div class="method-subsection discussion-section">
470470
<h4 class="method-subtitle">Discussion</h4>
471-
<p>You could need to deactivate gesture for specific direction on a web view for example. If your web view fits the screen on width, then you probably want to deactivate gestures on top and bottom. In this case, you can do
472-
&ndash; (PPRevealSideDirection)pprevealSideViewController:(<a href="../Classes/PPRevealSideViewController.html">PPRevealSideViewController</a><em>)controller directionsAllowedForPanningOnView:(UIView</em>)view {</p>
471+
<p>You could need to deactivate gesture for specific direction on a web view for example. If your web view fits the screen on width, then you probably want to deactivate gestures on top and bottom. In this case, you can do</p>
473472

474-
<p>if ([view isKindOfClass:NSClassFromString(@&ldquo;UIWebBrowserView&rdquo;)]) return PPRevealSideDirectionLeft | PPRevealSideDirectionRight;</p>
473+
<pre><code>- (PPRevealSideDirection)pprevealSideViewController:(PPRevealSideViewController*)controller directionsAllowedForPanningOnView:(UIView*)view {
475474

476-
<p>return PPRevealSideDirectionLeft | PPRevealSideDirectionRight | PPRevealSideDirectionTop | PPRevealSideDirectionBottom;
477-
}</p>
475+
if ([view isKindOfClass:NSClassFromString(@"UIWebBrowserView")]) return PPRevealSideDirectionLeft | PPRevealSideDirectionRight;
476+
477+
return PPRevealSideDirectionLeft | PPRevealSideDirectionRight | PPRevealSideDirectionTop | PPRevealSideDirectionBottom;
478+
}
479+
</code></pre>
478480
</div>
479481

480482

0 commit comments

Comments
 (0)