我的應用程序中的一個屏幕顯示了本地圖像的預覽,並且我在左上角有一個操作按鈕,用於顯示文檔交互選項:UIDocumentInteractionController沒有考慮到導航欄的色調
- (IBAction)actionButtonTapped:(id)sender {
self.interactionController = [UIDocumentInteractionController interactionControllerWithURL:self.attachmentLocalUrl];
self.interactionController.delegate = self;
[self.interactionController presentOptionsMenuFromRect:self.view.frame inView:self.view animated:YES];
}
這種運作良好,因爲它顯示了一個動作片有一個選項列表,其中包括電子郵件,通過電子郵件發送附件。當我點擊電子郵件按鈕時,它會顯示電子郵件的預覽圖以及其中的圖像。但有一件事情不起作用。我已經定製了我的應用程序的外觀,以便導航欄在整個應用程序中具有相同的顏色。下面是我在我的應用程序委託的didFinishLaunchingWithOptions首先運行代碼:
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
[UINavigationBar appearance].barTintColor = [UIColor blueColor];
[UINavigationBar appearance].tintColor = [UIColor whiteColor];
[UINavigationBar appearance].titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor]};
這非常適用於我自己的視圖控制器,而是由UIDocumentInteractionController顯示電子郵件預覽視圖控制器具有藍色而不是白色的欄按鈕的項目。由於其他參數正確應用,特別是導航欄的藍色背景,「取消」和「發送」操作按鈕幾乎不可見。
我已經嘗試在一個簡單的項目中重現這一點,但我不能。很顯然,我在我的應用程序中執行某些操作來干擾正常的定製。但我無法弄清楚什麼。任何想法我可能會調試?
你可以試試這個代碼可以幫助全力爲您 的http://計算器。COM /問題/ 26177142 /創建-A-粘視圖到了-導航欄/ 26177826#26177826 – 2014-10-13 05:08:17
你可以試試這個代碼 http://stackoverflow.com/questions/26177142/create-a-sticky - 查看導航欄/ 26177826#26177826 – 2014-10-13 05:09:27
同樣的問題。已經注意到這隻發生在設備上而不是在模擬器上。 – 2014-12-09 18:25:48