Skip to content

Commit

Permalink
#91 Fix: Wrong view position when in-call / tethering status bar is s…
Browse files Browse the repository at this point in the history
…hown
  • Loading branch information
1and2papa committed Feb 27, 2015
1 parent 5202830 commit 2e6f485
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CTAssetsPickerController/CTAssetsPickerController.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,16 @@ - (void)setupNavigationController
{
CTAssetsGroupViewController *vc = [[CTAssetsGroupViewController alloc] init];
UINavigationController *nav = [[self createChildNavigationController] initWithRootViewController:vc];

// Enable iOS 7 back gesture
nav.interactivePopGestureRecognizer.enabled = YES;
nav.interactivePopGestureRecognizer.delegate = nil;

nav.delegate = self;
[nav willMoveToParentViewController:self];
[nav.view setFrame:self.view.frame];

// Set frame origin to zero so that the view will be positioned correctly while in-call status bar is shown
[nav.view setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
[self.view addSubview:nav.view];
[self addChildViewController:nav];
[nav didMoveToParentViewController:self];
Expand Down

0 comments on commit 2e6f485

Please sign in to comment.