0
在IOS8中,如果您將圖標設置爲tabbaritem,則在單擊它時會將其檢查爲藍色。 只是很樣品:IOS8 UIButton突出顯示效果
FolderViewController* vcFolder = [[FolderViewController alloc] init];
[vcFolder setTabBarItem:[[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"folder", @"") image:[UIImage imageNamed:@"icon_folder.png"] tag:0]];
是有可能具有自定義圖像做的UIButton同樣的事情? 我知道我可以重寫uibutton並用藍色重繪圖像並顯示它。 但有沒有簡單的方法就像我們在tabbar項目上做的那樣簡單?
謝謝。但我不想創建另一個圖像。就像tabbaritem一樣,我們不必爲正常狀態和選定狀態創建2組圖像 – 2014-12-03 15:15:09