开发者

Zooming disturbing drawn UIImage in UIView

I have UIView in which I am drawing UIImage

- (void)drawRect:(CGRect)rect
{
    [myImage drawInRect:rect];
}

This UIView is added on UIScrollView and returned as zoomable view i.e

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{   
    return iImageBgView;
}

Problem is coming when I do the zoom. Image which is drawn is getting shown pixelet i.e blur or disturbed. can anyone help me on "How to refresh / redraw this image"

I am manually refreshing / redrawing the image by calling

[self setNeedsDisplay];

but no use. seems like it is taking the previous coordinate and draw as per that i开发者_如何学JAVAnstead of updated coordinate.

Thanks,

Sagar


This issue has been resolved by removing this UIView and adding it again on scrollview.

This has been done on

- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale
{
   // Remove Imageview and add to Scrollview again
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜