在UIView上绘制需要在这个方法中来处理
-(void)drawRect:(CGRect)rect
绘制需要用到ios的Core Graphic库
-(void)drawRect:(CGRect)rect {
CGContextRef context=UIGraphicsGetCurrentContenxt();
UIColor *fillColor=[UIColor colorWithRed: green: blue: alpha:1.0f]; ////your rgb
CGContextSetFillColorWithColor(context,fillColor.CGColor);
CGContextSetFillRect(context,rect);
}
-(void)drawRect:(CGRect)rect
绘制需要用到ios的Core Graphic库
-(void)drawRect:(CGRect)rect {
CGContextRef context=UIGraphicsGetCurrentContenxt();
UIColor *fillColor=[UIColor colorWithRed: green: blue: alpha:1.0f]; ////your rgb
CGContextSetFillColorWithColor(context,fillColor.CGColor);
CGContextSetFillRect(context,rect);
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货