zoukankan      html  css  js  c++  java
  • 创建不被渲染的image (uiimage扩展)--iOS

    @interface UIImage (PJXExtention)

    @property(nonatomic,strong,readonly)UIImage * originarImage;

    +(UIImage *)originarImageNamed:(NSString *)name NS_DEPRECATED_IOS(2_0, 3_0,"过期了 ,用pjx_originarImageNamed");

    +(UIImage *)pjx_originarImageNamed:(NSString *)name;

    @end

    #import "UIImage+PJXExtention.h"

    @implementation UIImage (PJXExtention)

    +(UIImage *)originarImageNamed:(NSString *)name

    {

        UIImage * image = [UIImage imageNamed:name];

        image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

        return image;

    }

    -(UIImage *)originarImage

    {

        return [self imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

    }

    +(UIImage *)pjx_originarImageNamed:(NSString *)name{

       

        UIImage * image = [UIImage imageNamed:name];

        image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

        return image;

    }

    @end

  • 相关阅读:
    hdu2089 不要62
    hdu4734 F(x)
    hdu3555 Bomb
    hdu3652 B-number
    hdu4352 XHXJ's LIS
    CodeForces 55D Beautiful numbers
    数位dp模板
    欧拉函数模板
    UVALive
    常用正则表达 (转)
  • 原文地址:https://www.cnblogs.com/PJXWang/p/5854804.html
Copyright © 2011-2022 走看看