Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9148901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:23:52+00:00 2026-06-17T11:23:52+00:00

I have a NSSplitView as my Superview. In this SplitView is a Custom View

  • 0

I have a NSSplitView as my “Superview”. In this SplitView is a Custom View with a NSTableView. I’m try to load my Custom View from a Controller class and then adjust the size of the custom view and the Table. But the table and or the custom view don’t get resized. What i’m doing wrong?

Here is my controller class method where i load and set the size of the custom view:
// Header File
@property (weak) IBOutlet NSView *navigationView;
@property (strong) AppsNavigationViewController *navigationViewController;

// Implementation
- (void) initNavigationView :(id)viewControllerClass :(NSString*) viewNibName {

  _navigationViewController = [[viewControllerClass alloc] 
                               initWithNibName:viewNibName bundle:nil]; 

 // add the current custom view to the parent view
 [_navigationView addSubview:[_navigationViewController view]];

 [[_navigationViewController view] setAutoresizingMask:
                                    NSViewHeightSizable|NSViewWidthSizable];

 // set the bounds of the custom view to the size of the parent view
 [[_navigationViewController view] setBounds:[_navigationView bounds]]; 

 [_navigationViewController setDelegate:self]; // not relevant

 [_splitView adjustSubviews]; // checked. contains the _navigationView

}

And here is how it looks:

nssplitview with custom view and nstable

EDIT
I subclassed some views and draw different backgrounds. And it’s definitely the custom view which don’t get the size!

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:23:53+00:00Added an answer on June 17, 2026 at 11:23 am

    It seems maybe your table’s frame is not at the origin of its super view. First, try setting the frame instead of the bounds and you could call this after you do that.

    [[_navigationViewController view] setFrameOrigin:NSMakePoint(0,0)];
    

    Normally though I usually set the frame/bounds like this because your superview’s bounds may not be at {0,0} of its superview…

    NSRect newFrame;
    newFrame.origin.x = 0;
    newFrame.origin.y = 0;
    newFrame.size.width = [[someView superview] frame].size.width;
    newFrame.size.height = [[someView superview] frame].size.height;
    [someView setFrame:newFrame]; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

have written this little class, which generates a UUID every time an object of
I have a horizontal NSSplitView which sits on top of right sub view of
I have an NSWindow with 2 NSViews (an NSSplitView and a custom NSView ).
Have written all the code in a silverlight class library (dll) and linked this
I have a vertical NSSplitView containing on one of its sides a NSScrollView with
i have a two-paned NSSplitView , one subview of it is an IKImageBrowserView .
Have deployed numerous report parts which reference the same view however one of them
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
Have a SQL problem, adding this model all works correctly, the problem is in
Have I in some way delete this Task or it is self-destroyed? Task.Factory.StartNew(() =>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.