Re: Completely baffled by NSTabViewController + Autolayout
Re: Completely baffled by NSTabViewController + Autolayout
- Subject: Re: Completely baffled by NSTabViewController + Autolayout
- From: Michael David Crawford <email@hidden>
- Date: Mon, 17 Aug 2015 21:39:32 -0700
> I am missing something big, because I am having nothing but insane trouble
> when trying to get a simple tab view working with autolayout. Every path I head down
> has strange problems. I've tried slimming it down to the smallest test project and
> I'm still confused.
That's because you're not using the...
ZooLib C++ Cross-Platform Application Framework:
http://www.zoolib.org/
The ZooLib Cookbook
http://zoolib.soggywizard.com/doc/cookbook/
ZooLib will also make your iOS and Mac OS X apps readily portable to
many of the operating system offerings of Apple's friendly
competitors.
(Soggy Wizard is a brand-new domain however I expect to start my web
server by tomorrow afternoon or so.)
Have A Nice Day.
Michael David Crawford P.E., Consulting Process Architect
http://mike.soggywizards.com/
email@hidden
One Must Not Trifle With Wizards For It Makes Us Soggy And Hard To Light.
PS: I've been bleeding in six colors since 1986.
On 8/17/15, Seth Willits <email@hidden> wrote:
> I am missing something big, because I am having nothing but insane trouble
> when trying to get a simple tab view working with autolayout. Every path I
> head down has strange problems. I've tried slimming it down to the smallest
> test project and I'm still confused.
>
> The problems I'm seeing are randomly positioned views and inconsistent
> sizing:
> http://www.sethwillits.com/temp/TabViewResizing1.mp4
>
> Here's the project:
> http://www.sethwillits.com/temp/TabViewResizing.zip
>
>
> The goal of this project as is, is simple: using an NSTabViewController, add
> multiple tab view items where each of the items has a view with its own
> autolayout-determined fixed size (as in, either an intrinsic content size,
> or the constraints of the subviews dictate the size of the view itself.)
> **That's it.** And I've been struggling with this for hours.
>
> In the test project I have two tabs. Each has an NSView subclass that has an
> intrinsic size so that the view itself must always be at that size. Those
> views are then added to the tabview via tab view items. I expect that the
> layout system will resize the views to be at their intrinsic size, and
> position them properly within the tab view.
>
> Instead I'm seeing them a) not always be at their intrinsic size, and b) if
> the tab switches in the middle of animating, then it stops at some
> interrupted size.
>
>
> Can anyone explain this?
>
>
>
> Bonus question:
> How am I supposed to get a normal bordered tab view with tabs on top using
> an NSTabViewController? Using
> NSTabViewControllerTabStyleSegmentedControlOnTop shows the segmented
> control, but there's no border? Using NSTabViewControllerTabStyleUnspecified
> + tabView.tabViewType = NSTopTabsBezelBorder; is as close as I can get, but
> then the tab view item's view placement is wrong?
>
>
>
> --
> Seth Willits
>
>
>
>
> _______________________________________________
>
> 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
--
Michael David Crawford, Consulting Software Engineer
email@hidden
http://www.warplife.com/mdc/
Every Deity Hath the Insight to Foretell the Future
Yet G-d Almighty Himself Possesseth Not the Power to Undo the Past.
_______________________________________________
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