我想在導航欄上留下最左側的圖像,但我不希望它起到按鈕的作用,僅僅是一個用於品牌塑造的圖像(確實只是顯示我的啓動圖標的一個版本) ,所以我這樣做:Apple將自定義圖像作爲leftBarButtonItem使用?
UIImageView *iconView=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"48 v3.png"]];
UIBarButtonItem *icon = [[UIBarButtonItem alloc] initWithCustomView:iconView];
self.navigationItem.leftBarButtonItem=icon;
這工作正常。 (版本未顯示)。
但我的問題是蘋果眼中這是否合適。我還沒有看到很多應用程序這樣做,但我已經看到很多使用titleView的圖像。看起來,leftBarButtonItem的位置是一個小品牌圖標的好地方。
人們對此有何看法,是否違反了蘋果的UI準則?有人被拒絕了嗎?圖像大小如何?