2012-12-14 32 views
0

我試圖在導航欄中顯示「設置齒輪」而不是「設置」一詞。有誰知道如何做到這一點?謝謝!將UIBarButtonItem更改爲簡單圖標

UIBarButtonItem *btnGo = [[UIBarButtonItem alloc] initWithTitle:@"Settings" 
style:UIBarButtonItemStyleBordered target:self action:@selector(settingsAction)]; 
self.navigationItem.rightBarButtonItem = btnGo; 

回答

0

不幸的是,沒有默認的方式來得到這個圖像。您應該使用initWithImage:style:target:action: 並添加您自己的圖像。你可以自己做一個,或獲得預軋從一些在那裏同樣Glyphish:http://www.glyphish.com

0

你可以嘗試做一個UIButton第一,它比設定變速圖像

UIBarButtonItem *btnGo = [[UIBarButtonItem alloc] initWithCustomView:btn];