开发者

NSView -scaleUnitSquareToSize leaves view blank until it's resized despite -setNeedsDisplay message

I used this guide: http://developer.apple.com/mac/library/qa/qa2004/qa1346.html to implement scaling in a special view. The scaled view is the document view of an NSScrollView. The problem is that when I call -scaleUnitSquareToSize, then call -setNeedsDisplay:YES (I also tried -setNeedsDisplay:YES on the scroll view), the view (not the scroll bar开发者_Go百科s, just everything inside) becomes blank. If I resize the window that contains the view, its contents reappear and display properly. But as soon as I rescale and redraw, it blanks out again. Any ideas on how to force the view to refresh properly?

Also, sorry for not providing source code, but the code is trade secret, so...


sounds like the clipview's not getting updated to deal with the scale of your contentview. Try logging the documentview, clipview, and contentview's frame and bounds.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜