Skip to content

Instantly share code, notes, and snippets.

@macshome
Created July 29, 2014 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macshome/55306e1cb10ce78755fa to your computer and use it in GitHub Desktop.
Save macshome/55306e1cb10ce78755fa to your computer and use it in GitHub Desktop.
NSTabView and NSSplitView are busted in beta 4 of Xcode 6 when using OS X Storyboards. If you are using Swift you can drop this file into your project to get them working until there is a fix.
//
// StoryboardExtensionsBeta4Fix.swift
//
// A workaround so that you can use SplitView
// and TabView items in OS X Storyboards on
// 10.10. Just drop this in your Swift project.
//
// Hopefully the need for this goes away in soon
// as it used to work.
import Cocoa
extension NSSplitViewItem
{
var controller: NSViewController! {
get {
return self.viewController
}
set {
self.viewController = newValue
}
}
}
extension NSTabViewItem
{
var controller: NSViewController! {
get {
return self.viewController
}
set {
self.viewController = newValue
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment