2013-07-03 58 views
0

我創建位圖與view.When大小的視圖增加高度,我怎樣才能提高此位圖的高度,並得出這樣的:如何更改iOS中的位圖大小?

- (void)drawRect:(CGRect)rect 
{ 
    CGContextRef context = UIGraphicsGetCurrentContext(); 

    CGContextSaveGState(context); 

    if (myBitmapContext) 
    { 
    CGImageRef imageref = CGBitmapContextCreateImage(myBitmapContext); 
    CGContextDrawImage(context, rect, imageref); 
    CGImageRelease(imageref); 
    } 

    CGContextRestoreGState(context); 
} 

謝謝您的幫助!

回答

0

在繪製圖像之前可以使用CGContextScaleCTM