Created
July 29, 2014 15:26
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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