Questions tagged [nstabviewcontroller]

NSTabViewController represents an abstract target for providing content switching

NSTabViewController is a container view controller class introduced in MacOS 10.10.

It provides:

  • Lazy loading of non-visible view controllers
  • Easy design time construction with Storyboarding
  • A target for bindings
  • Easy/abstract hookup for displaying large content switches
  • A way of providing standard tab-style UI with external controls

tabViewItems and selectedTabViewItemIndex are KVC/KVO compliant. This allows one to bind an NSSegmentedControl (or other bindable objects) directly to them.

40 questions
16
votes
3 answers

NSTabViewController ignoring transitions and title propagation settings

I am trying to create a preferences panel for my app using storyboards and the new NSTabViewController class. I can get it working, but the transition setting in the storyboard seems to be ignored. It just jumps from one tab to the next, with the…
Drew McCormack
  • 3,490
  • 1
  • 19
  • 23
14
votes
1 answer

Hide tab bar in NSTabViewController in storyboard

Does anybody know how to hide the tabbar within a NSTabView? There are just iOS versions out there but I need a solution for OSX. Here is my storyboard: I want to hide the tabbar… Where do I have to do it and how do I have to do it?
Tom el Safadi
  • 6,164
  • 5
  • 49
  • 102
10
votes
1 answer

Getting black screen on using tab bar while searching using SearchController

I have an app with a tab bar controller embedded in a navigation controller. The app has 2 tabs, the first one(search) has a search bar implemented using the UISearchController. If I switch from this tab to the other tab(downloads) while I'm…
8
votes
2 answers

NSSplitViewController based application almost never launches with the correct size

I have this app that uses a NSSplitViewController as the root and has a NSTabViewController connected as its detailViewController. This app is set to launch at 1024x768. The left pane should launch at 320x768 and the right pane (where the…
Duck
  • 34,902
  • 47
  • 248
  • 470
6
votes
1 answer

NSTabView comes with duplicate buttons in Interface Builder?

If I drag a Tab View Controller to the storyboard of an OS X application, the tab view buttons seem to misbehave. Can you help me understand what's going on? Here's an minimal example of a fresh project, where I simply replaced the default empty…
jjs
  • 1,338
  • 7
  • 19
5
votes
3 answers

NSWindow launching with wrong size after setting contentViewController to NSTabViewController

I have an Xcode project with an NSWindowController whose contentViewController was set to a subclass of NSViewController. I recently removed the NSViewController subclass from the storyboard and replaced the contentViewController with an…
5
votes
1 answer

NSTabViewController - How to create a custom transition?

I have an NSTabViewController which have attached 6 tabs (NSViewControllers). From IB I have the possibility to chose from a few predefined transitions, but I don't like any of them. So my question is : How can I make my own transition? PS: I'm…
C-Viorel
  • 1,801
  • 3
  • 22
  • 41
4
votes
2 answers

How to exclude certain AppKit views from restorable NSWindow?

NSWindows can be made restorable so that their configuration is preserved between application launches. https://developer.apple.com/documentation/appkit/nswindow/1526255-restorable Windows should be preserved between launch cycles to maintain…
pkamb
  • 33,281
  • 23
  • 160
  • 191
3
votes
1 answer

How to disable lazy loading in NSTabViewController?

I am designing a SwiftUI wrapper for NSTabViewController with the toolbar style. I want it to be a drop-in replacement for TabView. TabView uses a modifier tabItem(_:) to specify the tab name and icon. So I designed a similar modifier for my own…
osy
  • 41
  • 2
3
votes
4 answers

macOS NSTabViewController centered tab icons

I have a macOS app I have created. And I have a Preferences window built using a swift & storyboard with a tabless Toolbar styled NSTabViewController. I see no way to override the positioning of the tab icons though - they default to the left side…
gypsyDev
  • 1,232
  • 1
  • 14
  • 22
3
votes
1 answer

ContainerView on TabController Creates Phantom Tab

I am using a ContainerView to share a view amongst the various ViewControllers in an iOS app. This works well for the most part, except for the TabViewController, where it causes an extra blank tab item to be created. I have attached a screenshot…
vfxdrummer
  • 436
  • 4
  • 7
2
votes
2 answers

Changing Selected Tab in TabViewController Programmatically

I have an OS Mac app with two buttons and a Container View in my top level View Controller. I replaced the view controller linked to the Container View with a Tab View Controller. I would like to switch tabs using the buttons in the top level View…
curt
  • 4,422
  • 3
  • 42
  • 61
2
votes
0 answers

Force refresh of Upstream TabViewController

I am developing an app wherein a user action should lead to the reduction of TabController options (icons) from 5 down to 3. I understand the code required to modify the TabController but am unable to force it to refresh (viewDidLoad) since the…
2
votes
1 answer

Layout issue with NSSplitView inside NSTabView - missing constraints

I made a very simple dummy project to illustrate my problem (using Xcode 8.1 on 10.12.1). I have a storyboard with an NSTabViewController with 2 tabs, one of which is an NSSplitViewController. Although everything seems to work perfectly, I see the…
2
votes
0 answers

NSVisualEffectView with Tab View Controller using storyboard

Im using storyboard in my app and TabViewController with three tabs. When I put NSVisualEffectView in my views it works fine, but when I move my window, my VisualEffectView starting disappear. Settings for my visual effects are: Behind window,…
Prontto
  • 1,671
  • 11
  • 21
1
2 3