我想讓圖像佔據所有導航欄。這是基於導航的應用程序附帶的導航。它出現在隨附的UITableView的RootViewController上。我已經看到了一些如何工作的例子。將圖像添加到導航欄
集導航欄標題:
UIImage *image = [UIImage imageNamed:@"TableviewCellLightBlue.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
[self.navigationController.navigationBar.topItem setTitleView:imageView];
的問題有它僅覆蓋了標題,而不是整個導航欄。
還有這個線程:http://discussions.apple.com/message.jspa?messageID=9254241#9254241。最後,該解決方案看起來使用一個標籤欄,我沒有使用。設置導航欄背景很複雜?還有其他一些更簡單的技術嗎?
我想有一個導航的背景,仍然可以使用標題文本。
完美。謝謝。另外,你知道我可以如何設置標題欄的顏色嗎?我試過這個,但它不工作:[self.navigationController.navigationBar.titleView setBackgroundColor:[UIColor blueColor]]; – 4thSpace 2009-10-12 14:26:51
我也試過[navBar setBackgroundColor:[UIColor blueColor]]; – 4thSpace 2009-10-12 14:28:38
有tintColor屬性:嘗試navBar.tintColor = [UIColor blueColor]; – 2009-10-12 15:19:47