"Exhibition Letter Yan Open" How do I think of this word ... Because this is enough to express my current mood, has solved a problem, has a harvest.
My little friend in the morning asked me, "Do you want to use your own tab to change the color of the chart?" Change TabItem. "I remember being able to show it, but as he asked, it must have been an experiment, so I started my journey with relative idleness.
After running the previous project, I found that if the old code had no effect on iOS 8, first attach the previous code
[Tabbaritem setfinishedselectedimage:[uiimage imagenamed:@ "Selectimage.png"] withfinishedunselectedimage:[uiimage imagenamed:@ "Image.png"];
Now that there is no effect, it means that this method may not be used on the iOS8, click to view, if so
-(void) Setfinishedselectedimage: (UIImage *) selectedimage withfinishedunselectedimage: (UIImage *) Unselectedimage NS _deprecated_ios (5_0,7_0, "use initWithTitle:image:selectedImage:or the image and SelectedImage properties along with Uiimagerenderingmodealwaysoriginal ");
In this way, this method in the iOS7 above although has the effect, but should not use, but should use the new method provided later, because I understanding a little bit, tried several times to find the actual use of the method
UIImage * Normalimage = [[UIImage imagenamed:@ "Image.png"] Imagewithrenderingmode: Uiimagerenderingmodealwaysoriginal]; UIImage * Selectimage = [[UIImage imagenamed:@ "Selectimage.png"] Imagewithrenderingmode: Uiimagerenderingmodealwaysoriginal]; Uitabbaritem * Tabbaritem = [[Uitabbaritem alloc]initwithtitle:@] "Image:normalimage selectedimage:selectimage";
OK is a satisfactory solution good happy ah;
IOS 8 TabBar pictures show True Colors