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
}
精彩评论