Skip to content

Commit 67ef813

Browse files
committed
fix rickytan#147, prefersHomeIndicatorAutoHidden support
1 parent de8cba9 commit 67ef813

File tree

4 files changed

+33
-1
lines changed

4 files changed

+33
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
0.6.4
2+
3+
- fix #147, `prefersHomeIndicatorAutoHidden` support
4+
15
0.6.3
26

37
- fix #92, now you can use `self.navigationController.viewControllers` to access siblings

Example/RTRootNavigationController/RTItemDetailViewController.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ - (void)didReceiveMemoryWarning {
2424
// Dispose of any resources that can be recreated.
2525
}
2626

27+
- (BOOL)prefersHomeIndicatorAutoHidden
28+
{
29+
return YES;
30+
}
2731
/*
2832
#pragma mark - Navigation
2933

RTRootNavigationController.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'RTRootNavigationController'
11-
s.version = '0.6.3'
11+
s.version = '0.6.4'
1212
s.summary = 'Transparently make every view controller has its own navigation bar'
1313
s.description = <<-DESC
1414
More and more apps use custom navigation bar for each different view controller, instead of one common, gloabal navigation bar.

RTRootNavigationController/Classes/RTRootNavigationController.m

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,18 @@ - (UIStatusBarAnimation)preferredStatusBarUpdateAnimation
277277
return [self.contentViewController preferredStatusBarUpdateAnimation];
278278
}
279279

280+
#if __IPHONE_11_0 && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
281+
- (BOOL)prefersHomeIndicatorAutoHidden
282+
{
283+
return [self.contentViewController prefersHomeIndicatorAutoHidden];
284+
}
285+
286+
- (UIViewController *)childViewControllerForHomeIndicatorAutoHidden
287+
{
288+
return self.contentViewController;
289+
}
290+
#endif
291+
280292
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
281293
{
282294
return [self.contentViewController shouldAutorotateToInterfaceOrientation:toInterfaceOrientation];
@@ -529,6 +541,18 @@ - (UIStatusBarAnimation)preferredStatusBarUpdateAnimation
529541
return [self.topViewController preferredStatusBarUpdateAnimation];
530542
}
531543

544+
#if __IPHONE_11_0 && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
545+
- (BOOL)prefersHomeIndicatorAutoHidden
546+
{
547+
return [self.topViewController prefersHomeIndicatorAutoHidden];
548+
}
549+
550+
- (UIViewController *)childViewControllerForHomeIndicatorAutoHidden
551+
{
552+
return self.topViewController;
553+
}
554+
#endif
555+
532556
@end
533557

534558

0 commit comments

Comments
 (0)