0

this is my final window enter image description here

i added 4 subviews (last 4 in 2nd image) to the base view. but not displaying the view. after manual resizing window the subviews appeared as below. enter image description here

how can fix it?

Muruganandham K
  • 5,271
  • 5
  • 34
  • 62

2 Answers2

2
baseView.needsDisplay = YES;

-- or --

subview.superview.needsDisplay = YES;
geowar
  • 4,397
  • 1
  • 28
  • 24
0

You can use NSScrollView:

    NSScrollView* scrollView = [[NSScrollView alloc] init];
    [scrollView setHasHorizontalScroller: YES];
    [scrollView setHasVerticalScroller: YES];
    self.contentView = [[NSView alloc] initWithFrame: NSMakeRect(0, 0, 1.0e7, 1.0e7)];
    [self.contentView addSubview: [NSImageView ...]];        
    [self.contentView addSubview: [NSImageView ...]];        
    ...
    [scrollView setDocumentView: self.contentView];
    self.view = scrollView;

Or use Minimum Size for Window.

stosha
  • 2,108
  • 2
  • 27
  • 29