`
cxsjabc
  • 浏览: 19813 次
  • 性别: Icon_minigender_1
  • 来自: 合肥
最近访客 更多访客>>
社区版块
存档分类
最新评论

iphone-common-codes-ccteam源代码 CCCALayer.m

阅读更多
//  
//  CCCALayer.m  
//  CCFC  
//  
//  Created by xichen on 11-12-24.  
//  Copyright 2011 ccteam. All rights reserved.  
//  
  
#import "CCCALayer.h"  
  
  
@implementation CALayer(cc)  
  
+ (void)addTestLayer:(UIView *)view withRect:(CGRect)rect  
{  
    CALayer *layer = [[CALayer alloc] init];  
    layer.frame = rect;  
      
    UIColor *greenColor = [UIColor greenColor];  
    [layer setBackgroundColor:greenColor.CGColor];  
    [view.layer insertSublayer:layer atIndex:0];  
}  
  
- (void)setBg:(UIImage *)img  
{  
    self.contents = img.CGImage;  
}  
  
@end  


googlecode链接地址(会有更新):http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCCALayer.m
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics