• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:?


  • Subject: Re: NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:?
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 04 Aug 2011 11:25:39 -0700

On Aug 4, 2011, at 03:12, Daniel Vollmer wrote:

> On 3 Aug 2011, at 19:20, Quincey Morris wrote:
>
>> By modifying the frame of what? You should be changing the scroll view frame, but you make it sound like you're changing the table view frame.
>
> The frame of the tableview. I want the scrollview to stay the same size, only to display half of twice as much content (i.e. display the left half of the original content in twice as much detail, with the ability to scroll over to the 2nd half).

The relationship between the table view and the scroll view is more intimate than that. The view hierarchy (not all shown in IB) is scroll view --> clip view --> document view, and in this case the document view is the table view. The only way you can *directly* have the table view be "half" of the scroll view's "content" is to mess with the scroll view's internal layout, and that may violate the table view's assumptions about its relationship to the enclosing views.

If you want to have other "content" that scrolls along with the table view inside the scroll view (which I *think* is what you're trying to do), then the correct way to do it is to enclose the table view (along with its own scroll view) and the associated content in a containing scroll view (which means the table view's scroll view and the other content will be enclosed in a custom view that's the outer scroll view's document view). The "inner" scroll view would be set to autoresize, so it basically has no effect, all the resizing being driven by the outer scroll view.

While it may seem ridiculous to have the extra, useless, inner scroll view, it's actually just easer to go with the flow on this. You can *try* to divorce a table view from the scroll view that IB creates for it, but IMO it isn't worth the effort or the pain.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:?
      • From: Daniel Vollmer <email@hidden>
References: 
 >NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:? (From: Daniel Vollmer <email@hidden>)
 >Re: NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:? (From: Quincey Morris <email@hidden>)
 >Re: NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:? (From: Daniel Vollmer <email@hidden>)

  • Prev by Date: Re: finding my UIViewController
  • Next by Date: Re: [iOS] Block animation kills performance
  • Previous by thread: Re: NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:?
  • Next by thread: Re: NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:?
  • Index(es):
    • Date
    • Thread