カラーUIImageで絵を描きます

+(UIImage * )clearImageView { 
    UIColor *色= [UIColor clearColor]。
    CGRect RECT = CGRectMake(006464 )。
    UIGraphicsBeginImageContext(rect.size)。
    CGContextRefコンテキスト = UIGraphicsGetCurrentContext()。
    CGContextSetFillColorWithColor(コンテキスト、[色CGColor])。
    CGContextFillRect(コンテキスト、RECT)。
    UIImage *画像= UIGraphicsGetImageFromCurrentImageContext()。
    リターン画像; 
}

 

おすすめ

転載: www.cnblogs.com/cchHers/p/12297602.html