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

MWMSegue.mm « Classes « Maps « iphone - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: de7a3276c74a55f1cdc95026378a914382f7df32 (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
#import "Common.h"
#import "MWMSegue.h"

@implementation MWMSegue

+ (void)segueFrom:(UIViewController *)source to:(UIViewController *)destination
{
  [[[MWMSegue alloc] initWithIdentifier:@"" source:source destination:destination] perform];
}

- (void)perform
{
  UINavigationController * nc = self.sourceViewController.navigationController;
  UIViewController * dvc = self.destinationViewController;
  if (isIOS7)
  {
    if ([dvc isMemberOfClass:[UINavigationController class]])
      [nc presentViewController:dvc animated:YES completion:nil];
    else
      [nc pushViewController:dvc animated:YES];
  }
  else
  {
    [nc showViewController:dvc sender:nil];
  }
}

@end