1
我只是想在我的iPad分割視圖應用程序中更改以縱向模式(顯示主視圖)啓動彈出式菜單的標題。在我的生活中,我無法弄清楚如何引用這個按鈕。我通過使用主細節應用程序模板(iOS 5和故事板)創建一個新項目來啓動應用程序,並且大部分界面代碼都始於故事板文件。任何幫助表示讚賞。在縱向模式下的iPad拆分視圖 - 彈出式按鈕標題
我只是想在我的iPad分割視圖應用程序中更改以縱向模式(顯示主視圖)啓動彈出式菜單的標題。在我的生活中,我無法弄清楚如何引用這個按鈕。我通過使用主細節應用程序模板(iOS 5和故事板)創建一個新項目來啓動應用程序,並且大部分界面代碼都始於故事板文件。任何幫助表示讚賞。在縱向模式下的iPad拆分視圖 - 彈出式按鈕標題
在你的細節視圖中,你會發現你的分割視圖的委託方法,用於在縱向模式下添加新按鈕(也可以使用類似的方法 - 但它們都有UIBarButtonItem *參數):
-(void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)pc
{
barButtonItem.title = @"Your custom title goes here";
[self.navigationItem setLeftBarButtonItem:barButtonItem animated:YES];
self.masterPopoverController = pc;
}
就是這樣 - 你完成了。
哇。我受過教育。謝謝你的幫助。 – Destron 2012-02-17 03:00:25