以下是我的問題:我在UINavigationController的頂部有一個導航欄。我有它設置爲禁用和重新啓用時,某些彈出屏幕上。一種情況不起作用:當Dropbox彈出窗口出現在屏幕上時,該欄會禁用,因爲它應該是。但是,當我關閉彈出窗口(按取消)時,導航欄會重新啓用,但應用程序處於打開狀態時它會保持灰顯狀態,儘管它的功能正常。在這一點上它應該回到藍色。當我關閉其他的餡餅時它會變成藍色。只是Dropbox的一個給我的問題。我沒有看到任何一種NavBar的「Highlighted」屬性,並且我正確切換了UserInteractionEnabled屬性。有任何想法嗎?iOS導航欄功能正常,但顏色錯誤
1
A
回答
1
將此代碼置於popover的取消操作。
你可以用這一個ios7
[self.navigationController.navigationBar setBarTintColor:[UIColor blueColor]];
這一個是iOS6的
[self.navigationController.navigationBar setTintColor:[UIColor blueColor]];
感謝
1
// This is for iOS 7.0 or more than that.
if ([self.navigationController.navigationBar respondsToSelector:@selector(setBarTintColor:)]) {
self.navigationController.navigationBar.barTintColor = [UIColor blueColor];
} else {
[self.navigationController.navigationBar setTintColor:[UIColor blueColor]];
}
// For text alignments
[[UINavigationBar appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0],
UITextAttributeTextColor,
[UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0],
UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(0, -1)],
UITextAttributeTextShadowOffset,
[UIFont fontWithName:@"Helvetica-Bold" size:20.0],//[UIFont fontWithName:@"DynoBold" size:20.0],
UITextAttributeFont,
nil]];
相關問題
- 1. iOS:導航欄標題 - 兩種顏色
- 2. Swift - iOS:更改導航欄的顏色
- 3. 導航欄的HTML顏色
- 4. Bootstrap 4導航欄顏色
- 5. 默認導航欄顏色
- 6. 導航欄顏色問題
- 7. 導航欄字體顏色
- 8. 列表導航欄問題(顏色,功能)
- 9. Bootstrap可以改變導航欄的顏色,但不能擺脫顏色?
- 10. 嘗試改變導航欄的背景顏色,但未能
- 11. 設置iOS導航背景顏色無法正常工作
- 12. iOS狀態欄更改顏色以自行匹配導航欄
- 13. ios 7狀態欄不繼承導航欄顏色
- 14. 相同的顏色狀態欄和導航欄的iOS
- 15. 在iOS 7中設置導航欄色調顏色
- 16. 的iOS:無法設置導航欄色調顏色
- 17. 引導導航欄:overiding字體顏色
- 18. 引導導航欄的文本顏色
- 19. 導航欄不能正常工作html
- 20. 導航欄不能正常工作
- 21. Bootstrap導航欄不能正常摺疊
- 22. 導航欄BackButton不能正常工作
- 23. 狀態欄顏色不變根據導航欄的顏色
- 24. Bootstrap:文本導航欄文本錯誤的顏色
- 25. CSS導航欄不是水平的,顏色錯誤
- 26. iOS 7導航欄截圖錯誤?
- 27. IOS右鍵導航欄不能正常工作
- 28. 粘性導航欄功能
- 29. Appstore導航欄功能
- 30. 如何設置正確的導航欄色調顏色?
一些相關的代碼? – nhgrif