iOS Find the black line below the navigation bar (can hide, change style, etc.)HTTP://WWW.JIANSHU.COM/P/EFFA4A48F1E3 setting the rendering mode for UIImage: uiimage.renderingmodehttp://blog.csdn.net/djxiaoyu_haha/ article/details/40949083 Coloring (Tint Color) is one of the iOS7 interfaces. Set the rendering mode of the UIImage: Uiimage.renderingmode A significant change, you can set a UIImage whether to use the tint Color of the current view when rendering. UIImage added a read-only property: Renderingmode, corresponding to a new method: Imagewithrenderingmode:, It uses the Uiimagerenderingmode enumeration value to set the Renderingmode property of the picture. The enumeration contains the following values:
- Uiimagerenderingmodeautomatic//Adjusts the rendering mode automatically based on the environment in which the picture is used and the drawing context in which it is located.
- Uiimagerenderingmodealwaysoriginal//Always draws the original state of the picture without using tint Color.
- Uiimagerenderingmodealwaystemplate//Always draws a picture based on tint color, ignoring the color information of the picture.
The default value of the Renderingmode property is Uiimagerenderingmodeautomatic, which is whether uiimage uses tint color depending on where it is displayed. Other conditions can be seen in the following illustration
The following code shows how simple it is to create a picture using an established rendering pattern:
- UIImage *img = [UIImage imagenamed:@ "MyImage"];
- IMG = [img imagewithrenderingmode:uiimagerenderingmodealwaystemplate];
IOS navigation bar black line, UIImage enumeration processing mode