我想從模態視圖設置NavigationController,但我無法弄清楚如何使用界面生成器設置佈局選項。這是我正在使用的代碼。從Modal View設置NavigationController並在界面構建器中設置佈局?
//Create the view you want to present modally
UIViewController *modalView = [[UIViewController alloc] init];
//Create a new navigation stack and use it as the new RootViewController for it
UINavigationController *nav = [[UINavigationController alloc]
initWithRootViewController:modalView];
//Present the new navigation stack modally
[self presentModalViewController:nav animated:YES];
//Release
[modalView release];
[nav release];
反正有設置在Interface Builder中navigationcontroller的佈局選項?我試着設置使用
nav.navigationBar.tintColor = [UIColor colorWithRed:128 green:0 blue:0 alpha:1];
的顏色,而是導致在明亮的紅色,而不是栗色此RGB組合被認爲導致英寸
這將是對我來說容易得多,如果我能控制的導航控制器選項從接口生成器,這是可能的這個設置?
您只能在IB的主視圖中設置導航欄的色調顏色。如果你想改變視圖之間的色調,你必須對它進行硬編碼。 – rishi 2012-01-08 06:33:31