I have scrollview added with interface builder its implemented in NSWindow
view and in NSScrollview
i added CustomView i'm using this code line in my
AppDelegate.m
- (void)awakeFromNib
id docView = paintingfield;
id viewas = [[NSScrollView alloc] initWithFrame:
[[scrollview contentView] frame]];
[scrollview setHasVerticalScroller:YES];
[scrollview setHasHorizontalScroller:YES];
[scrollview setBorderType:NSNoBorder];
[scrollview setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable];
[scrollview setDocumentView:docView];
[scrollview setContentView:viewas];
an in my AppDelegate.h
IBOutlet NSScrollView * scrollview;
IBOutlet NSView * view;
IBOutlet CustomView *paintingfield;
IBOutlets
are linked propertly NSScrollView
to NSScrollView
, NSView
to CustomView, CustomView to CustomView.
-awakeFromNib
is called
the problem is because of NSScrollView
when i open image i get blank window instead of opened image with scroll without NSScrollView
image opens proper too any ideas how can i fix it?