开发者

NSVIew Custom view is not resizing

I am newbie in Mac programming, using all standard approach I put a custom view inside a window contro开发者_C百科ller. When I try to resize a window by mouse, inner content, i.e. custom view is not getting resized.

Can anyone tell me what is missing in my code? So far I have done following:

  1. Setting AutoResize subview in all view inside the window
  2. Set AutoResizeMask to Width and height

When I checked using NSLog in reference code where resize is happening, then I came to know for my code DrawRect for a view is not getting called. I suspect this might be the issue, but why this is not getting I am not able to figure it out.


Is your code like this

[yourCustomView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜