From 6dc6a0e37cfc122d33f5c9ba4d5ed6b644447590 Mon Sep 17 00:00:00 2001 From: Carola Nitz Date: Tue, 23 Jan 2018 17:20:06 +0100 Subject: [PATCH] VLCAppDelegate: wrap appearance changes in available ios11 block --- Sources/VLCAppDelegate.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/VLCAppDelegate.m b/Sources/VLCAppDelegate.m index 98b4249e..d9043b1e 100644 --- a/Sources/VLCAppDelegate.m +++ b/Sources/VLCAppDelegate.m @@ -208,8 +208,10 @@ NSString *const VLCDropboxSessionWasAuthorized = @"VLCDropboxSessionWasAuthorize [[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[VLCPlaybackNavigationController class]]] setBarTintColor: nil]; [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; [[UINavigationBar appearance] setTitleTextAttributes: @{ NSForegroundColorAttributeName : [UIColor whiteColor] }]; - [[UINavigationBar appearance] setPrefersLargeTitles:@YES]; - [[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[VLCPlaybackNavigationController class]]] setPrefersLargeTitles: @NO]; + if (@available(iOS 11.0, *)) { + [[UINavigationBar appearance] setPrefersLargeTitles:@YES]; + [[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[VLCPlaybackNavigationController class]]] setPrefersLargeTitles: @NO]; + } // For the edit selection indicators [[UITabBar appearance] setTintColor:vlcOrange]; [[UITableView appearance] setTintColor:vlcOrange]; -- GitLab