浏览代码

Fix crash on launch in iOS 6.1. -[UINavigationBar/UISearchBar barTintColor] is iOS 7+ only

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Marc Etcheverry 11 年之前
父节点
当前提交
435f914857
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Sources/VLCPlaylistViewController.m

+ 3 - 1
Sources/VLCPlaylistViewController.m

@@ -154,7 +154,9 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
     if (_usingTableViewToShowData) {
         _searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
         UINavigationBar *navBar = self.navigationController.navigationBar;
-        _searchBar.barTintColor = navBar.barTintColor;
+        if (SYSTEM_RUNS_IOS7_OR_LATER) {
+            _searchBar.barTintColor = navBar.barTintColor;
+        }
         _searchBar.tintColor = navBar.tintColor;
         _searchBar.translucent = navBar.translucent;
         _searchBar.opaque = navBar.opaque;