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 8684397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:17:53+00:00 2026-06-12T22:17:53+00:00

The question: Why having a header view prevents scroll view from being resized by

  • 0

The question: Why having a header view prevents scroll view from being resized by auto layout?

I’m trying to embed my custom view in a scroll view, which in turn is enclosed in a split view. I’ve created the following view hierarchy using Interface Builder in Xcode 4.5 DP 4, but the same problem seems to happen also in Xcode 4.4.

NSWindow
  NSView (content view of the window)
    NSSplitView
      NSView (split view panel)
      NSView (split view panel)
        NSScrollView
          TestView (my custom view)

Now, if TestView provides a NSTableHeaderView (via -headerView) property the split view divider cannot be dragged all the way to bottom (or right) to hide the TestView but stops to the boundary of the initial width or height of the TestView. If the -headerView property returns nil, the divider can be dragged freely.

This can be reproduced every time, just by creating a fresh Cocoa application project, adding the views and running the project. The steps:

  1. Create a new Cocoa Application project
  2. Create TestView class with headerView property which returns a NSTableHeaderView instance.
  3. Edit MainMenu.xib and add a split view
  4. Add custom view and make it TestView
  5. Choose Editor -> Embed in -> Scroll view
  6. Run the project

(No constraints or other Interface Builder menus touched)

TestView.m:

@implementation TestView {
    NSTableHeaderView *_header;
}

- (NSTableHeaderView *)headerView
{
    if (!_header) {
        _header = [[NSTableHeaderView alloc]
                   initWithFrame:NSMakeRect(0.0, 0.0, 100.0, 17.0)];
    }

    return _header;
}

@end

Any pointers, what should I do to get the split view divider moving again?

  • 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-12T22:17:54+00:00Added an answer on June 12, 2026 at 10:17 pm

    Implement this NSSplitViewProtocol method in a convenient class:

    - (BOOL)splitView:(NSSplitView *)splitView shouldAdjustSizeOfSubview:(NSView *)subview {return TRUE;}
    

    Make sure to connect the split view’s delegate output the class object.

    The split view can now be adjusted to any size.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question: I am having issues passing session variables from parent page to iFrame page
I've a question about printing text in header and footer of table view section.
I am just getting into Sharepoint, and I have a question about having a
Question: I'm having a little trouble with jQuery: Consider this HTML, where I want
I'm having a question related to the maven properties plugin. My question is somewhat
On the back of my previous question I am having some trouble with the
Happy easters, everyone. I am currently learning topological sort and having a question about
After having my last question answered , I have never see the preventDefault(); function
Having typed the question and checked the similar title questions im gonna continue as
Having read this question Immutable or not immutable? and reading answers to my previous

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.