1 UIImageRenderingMode属性:图片的渲染效果。其是个结构体:包括web
UIImageRenderingModeAutomatic, // Use the default rendering mode for the context where the image is used 使用默认的渲染效果,从属于控件上一级的系统渲染效果spa
UIImageRenderingModeAlwaysOriginal, // Always draw the original image, without treating it as a template 使用图片自己的效果,不使用图片通过模版效果处理图片orm
UIImageRenderingModeAlwaysTemplate, // Always draw the image as a template image, ignoring its color information 使用模版,即便用通过模版渲染处理的图片,无论原图片的状况继承
此属性经常使用在方法:图片
- (UIImage *)imageWithRenderingMode:(UIImageRenderingMode)renderingMode NS_AVAILABLE_IOS(7_0);it
此属性经常使用的场景:navigation bars, tab bars, toolbars, and segmented controls automatically treat their foreground images as templates, while image views and web views treat their images as originalsio
####尤为注意的是:子控件和父控件的继承关系:系统中一些属性默认是子控件继承父控件的属性设置。所以在诸如透明度alpha等问题上,子控件是默认遵循父控件的设置的,父控件是不透明的,其子控件必是不透明的。form