我创建了一个视图大小的位图。当视图增加高度时,我怎样才能增加这个位图的高度并像这样绘制它:
- (void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
if (myBitmapContext)
{
CGImageRef imageref = CGBitmapContextCreateImage(myBitmapContext);
CGContextDrawImage(context, rect, imageref);
CGImageRelease(imageref);
}
CGContextRestoreGState(context);
}
谢谢您的帮助!!