1 //IOS8 used to be:2 3Uitabbaritem *photoitem = [[Uitabbaritem alloc] Initwithtitle:@"Home Page"Image:[uiimage imagenamed:@"app2"] Tag:0];4 5Photo.tabbaritem =Photoitem;6 7[Photo.tabbaritem setfinishedselectedimage:[uiimage imagenamed:@"App1"] Withfinishedunselectedimage:[uiimage imagenamed:@"app2"]];8 9[Photoitem release];
- After viewing the API see the new API method used
1 //Use the new API method to initialize the Tabbaritem2-(Instancetype) Initwithtitle: (NSString *) title Image: (UIImage *) image selectedimage: (UIImage *) SelectedImage3 //at the same time to use the UIImage set Uiimagerenderingmode, using Uiimagerenderingmodealwaysoriginal4 5 //Use cases:6UIImage * Normalimage = [[UIImage imagenamed:@"Nor.png"] imagewithrenderingmode:uiimagerenderingmodealwaysoriginal];7UIImage * Selectimage = [[UIImage imagenamed:@"Select.png"] imagewithrenderingmode:uiimagerenderingmodealwaysoriginal];8 9Uitabbaritem * Tabbaritem = [[Uitabbaritem alloc]initwithtitle:@""Image:normalimage Selectedimage:selectimage];
IOS8 Tabbaritem setting Custom picture issues