【发布时间】:2014-08-02 00:26:05
【问题描述】:
在我的 iOS 应用程序中,我使用 DocumentInteractionController 来预览 .csv 文档。
self.documentController = [UIDocumentInteractionController interactionControllerWithURL:fileLocation];
[self.documentController setDelegate:self];
[self.documentController presentPreviewAnimated:YES];
但是,我发现导航栏是完全透明的。后退按钮是白色的,因此由于白色背景,它是不可见的。
请注意,我在 AppDelegate 中设置了导航栏的样式:
[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:0/255.0f green:138/255.0f blue:188/255.0f alpha:1.0f]];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearance] setTitleTextAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"DINPro-Bold" size:17]}];
[[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setShadowImage:[UIImage imageNamed:@"shadow"]];
[[UITabBar appearance] setSelectedImageTintColor:[UIColor whiteColor]];
[[UITabBar appearance] setTintColor:[UIColor whiteColor]];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];
本质上,我的问题是如何使 DocumentInteractionController View Controller 中导航栏的外观与整个应用程序中导航栏的外观保持一致(或至少可见!)。
【问题讨论】:
-
你能发一张其他导航栏的截图吗?
-
方法
– documentInteractionControllerViewControllerForPreview:返回什么
标签: ios uinavigationbar uidocumentinteraction