Skip to content

Commit

Permalink
Fixes bottom bar hidden in QLPreviewController
Browse files Browse the repository at this point in the history
  • Loading branch information
steventroughtonsmith committed Jun 12, 2016
1 parent 97beff5 commit f053666
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions Files/FBColumnNavigationController.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ -(void)_performPop:(id)sender
[self.columnViewController popToViewController:self];
}


@end
3 changes: 1 addition & 2 deletions Files/FBColumnViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,12 @@ -(void)pushViewController:(UIViewController <FBColumnViewControllerChild>*)vc
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
{
[self.rootNavigationController pushViewController:vc.childViewControllers.firstObject animated:YES];
[self.rootNavigationController setToolbarHidden:NO];
}
else
{
[self layout];



self.view.contentSize = CGSizeMake(self.viewControllers.lastObject.view.frame.origin.x+self.viewControllers.lastObject.view.frame.size.width, self.view.frame.size.height-44-_FBStatusBarDelta());
[self.view scrollRectToVisible:vc.view.frame animated:YES];
}
Expand Down
6 changes: 3 additions & 3 deletions Files/FBFilesTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
[self.columnViewController popToViewController:self.parentViewController];

FBCustomPreviewController *preview = [[FBCustomPreviewController alloc] initWithFile:newPath];

FBColumnNavigationController *detailNavController = [[FBColumnNavigationController alloc] initWithRootViewController:preview];

[self.columnViewController pushDetailViewController:detailNavController];
Expand All @@ -376,10 +376,10 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath

FBQLPreviewController *preview = [[FBQLPreviewController alloc] init];
preview.dataSource = self;

FBColumnNavigationController *detailNavController = [[FBColumnNavigationController alloc] initWithRootViewController:preview];

[self.columnViewController pushDetailViewController:detailNavController];

}
}
}
Expand Down
5 changes: 5 additions & 0 deletions Files/FBQLPreviewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ -(BOOL)canBecomeFirstResponder
return NO; // Don't let QLPreviewController interfere with keyboard shortcuts
}

-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.navigationController setToolbarHidden:NO];
}
@end

0 comments on commit f053666

Please sign in to comment.