Amitg2k12
Amitg2k12

Reputation: 3805

NSVIew Custom view is not resizing

I am newbie in Mac programming, using all standard approach I put a custom view inside a window controller. 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.

Upvotes: 4

Views: 2112

Answers (1)

dbrajkovic
dbrajkovic

Reputation: 3703

Is your code like this

[yourCustomView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];

Upvotes: 4

Related Questions