1. System default rendering of image removal
Select the picture, set the property to render as original image
Code Control:
#import <UIKit/UIKit.h>
@interface UIImage (hkextension)
@property (nonatomic,strong,readonly) UIImage * resizbleimage;
@property (nonatomic,strong,readonly) UIImage * originarimage;
+ (UIImage *) Hk_resizbleimage: (NSString *) name;
+ (UIImage *) imagewithoriginalnamed: (NSString *) name;
+ (UIImage *) hk_imagewithoriginalnamed: (NSString *) name;
@end
#import "Uiimage+hkextension.h"
@implementation UIImage (hkextension)
not be rendered
-(UIImage *) originarimage
{
return [self imagewithrenderingmode:uiimagerenderingmodealwaysoriginal];
}
+ (UIImage *) hk_imagewithoriginalnamed: (NSString *) name
{
UIImage * image = [UIImage imagenamed:name];
return [Image imagewithrenderingmode:uiimagerenderingmodealwaysoriginal];
}
not be rendered
+ (UIImage *) imagewithoriginalnamed: (NSString *) name
{
UIImage * image = [UIImage imagenamed:name];
return [Image imagewithrenderingmode:uiimagerenderingmodealwaysoriginal];
}
Protect the surrounding stretch by one pixel point
+ (UIImage *) Hk_resizbleimage: (NSString *) name
{
UIImage * image = [UIImage imagenamed:name];
return [Image StretchableImageWithLeftCapWidth:image.size.width * 0.5 topCapHeight:image.size.height * 0.5];
}
@end
2. Remove text rendering
Set the properties of all Uitabbaritem in the application
Uitabbaritem * item = [Uitabbaritem appearance];//thought to be a skin
Property dictionary
Nsdictionary * Dict = @{
Nsfontattributename: [Uifont systemfontofsize:12],
Nsforegroundcolorattributename: [Uicolor Graycolor]
};
Nsdictionary * Dictselect = @{nsforegroundcolorattributename: [Uicolor Darkgraycolor]};
[item settitletextattributes:dict Forstate:uicontrolstatenormal];
[item Settitletextattributes:dictselect forstate:uicontrolstateselected];
Note: The font size setting is not used when the text is selected, and the text size can only be set in the normal state
iOS removes the default image and text rendering of the system