swiftcocoastoryboardnstabviewcontroller

How do I get a crossfade transition with resize on macos using storyboard & NSTabViewController?


On a brand new MACOS application project (swift, storyboards), using the latest available version of xCode (8.3) I can't get a crossfade transition with a NSTabViewController that I add to my story board. The window is not resizing as well. What am I doing wrong ?

I start by adding a new window controller, I remove its content view controller that I replace by a tabviewcontroller. The tabview controller comes with two tabs wired to two view controllers. I resize one of them to make it bigger and put random buttons on both of them to be able to check wether the full view is visible or not at runtime.

Everything is left with default settings, as well as the "crossfade" transition of the tabviewcontroller.

But when running the application, tabs change abruptly, and the window doesn't resize to display the new tab.

My goal is to build a preference panel on my storyboard ans I just fail on the first steps.


Solution

  • For crossfade animation to work, you need to connect delegate outlet of the tab view to the tab view controller.

    It does not seem smooth resize is supported by the standard tab view, though.