Welcome to mirror list, hosted at ThFree Co, Russian Federation.

NavigationController.mm « Classes « Maps « iphone - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7061bf4fa382c550ee7fa896b5c91cc835bda4ca (plain)
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

#import "NavigationController.h"
#import "MapsAppDelegate.h"
#import "UIViewController+Navigation.h"
#import "MapViewController.h"

@interface NavigationController () <UINavigationControllerDelegate>

@end

@implementation NavigationController

- (UIStatusBarStyle)preferredStatusBarStyle
{
  return UIStatusBarStyleLightContent;
}

- (void)viewDidLoad
{
  [super viewDidLoad];

  self.delegate = self;
  self.autorotate = YES;
}

- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
  [navigationController setNavigationBarHidden:[viewController isMemberOfClass:[MapViewController class]] animated:animated];

  if ([navigationController.viewControllers count] > 1)
    [viewController showBackButton];
}

- (BOOL)shouldAutorotate
{
  return self.autorotate;
}

@end