Commit 171d62dc authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

Fix multiple navigation bar appearance issues in the future

parent 6888e1d4
......@@ -52,6 +52,8 @@
- (void)viewWillAppear:(BOOL)animated
{
self.navigationController.navigationBar.translucent = NO;
if ([[UIPasteboard generalPasteboard] containsPasteboardTypes:@[@"public.url", @"public.text"]]) {
NSURL *pasteURL = [[UIPasteboard generalPasteboard] valueForPasteboardType:@"public.url"];
if (!pasteURL || [[pasteURL absoluteString] isEqualToString:@""]) {
......@@ -66,6 +68,13 @@
[super viewWillAppear:animated];
}
- (void)viewWillDisappear:(BOOL)animated
{
if (SYSTEM_RUNS_IN_THE_FUTURE)
self.navigationController.navigationBar.translucent = YES;
[super viewWillDisappear:animated];
}
#pragma mark - UI interaction
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
......
......@@ -36,8 +36,17 @@
self.passwordLabel.text = NSLocalizedString(@"PASSWORD_LABEL", @"");
}
- (void)viewWillAppear:(BOOL)animated
{
self.navigationController.navigationBar.translucent = NO;
[super viewWillAppear:animated];
}
- (IBAction)dismissWithAnimation:(id)sender
{
if (SYSTEM_RUNS_IN_THE_FUTURE)
self.navigationController.navigationBar.translucent = YES;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
[self.navigationController popViewControllerAnimated:YES];
else
......@@ -46,6 +55,9 @@
- (IBAction)dismiss:(id)sender
{
if (SYSTEM_RUNS_IN_THE_FUTURE)
self.navigationController.navigationBar.translucent = YES;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
[self.navigationController popViewControllerAnimated:NO];
else
......
......@@ -44,6 +44,8 @@
- (void)viewWillAppear:(BOOL)animated
{
self.navigationController.navigationBar.translucent = NO;
if ([[UIPasteboard generalPasteboard] containsPasteboardTypes:@[@"public.url", @"public.text"]]) {
NSURL *pasteURL = [[UIPasteboard generalPasteboard] valueForPasteboardType:@"public.url"];
if (!pasteURL || [[pasteURL absoluteString] isEqualToString:@""]) {
......@@ -64,6 +66,9 @@
- (void)viewWillDisappear:(BOOL)animated
{
if (SYSTEM_RUNS_IN_THE_FUTURE)
self.navigationController.navigationBar.translucent = YES;
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:[NSArray arrayWithArray:_recentURLs] forKey:kVLCRecentURLs];
[defaults setBool:self.privateToggleSwitch.on forKey:kVLCPrivateWebStreaming];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment