nsstoryboard

Document-Based App autosave with storyboards

喜欢而已 提交于 2021-01-21 10:29:33
问题 In Document-Based Apps, using XIB files, when a new window is created its behaviour is: Be positioned and sized based on the position of the last active window. If the last active window is still visible then the new window should be cascaded so it doesn't directly overlap. However when using a storyboard this isn't done. See test project. 回答1: You can set shouldCascadeWindows on the window controller in your storyboard: select the window controller in the storyboard select the identity

Mac OSX Storyboard : communicate between NSViewController

别等时光非礼了梦想. 提交于 2019-12-24 05:29:25
问题 I use storyboard in a OS X cocoa application project with a SplitView controller and 2 others view controller LeftViewController and RightViewController. In the LeftViewController i have a tableView that display an array of name. The datasource and delegate of the tableview is the LeftViewController. In the RightViewController i just have a centered label that display the select name. I want to display in the right view the name selected in the left view. To configure the communication

Mac OSX Storyboard : communicate between NSViewController

蓝咒 提交于 2019-12-24 05:29:11
问题 I use storyboard in a OS X cocoa application project with a SplitView controller and 2 others view controller LeftViewController and RightViewController. In the LeftViewController i have a tableView that display an array of name. The datasource and delegate of the tableview is the LeftViewController. In the RightViewController i just have a centered label that display the select name. I want to display in the right view the name selected in the left view. To configure the communication

Instantiating split view controller by identifier in OS X storyboard does not load view hierarchy

人走茶凉 提交于 2019-12-11 09:06:49
问题 I'm trying to implement a master-detail-detail view in a Swift OS X application. The top-level view controller is an NSSplitViewController with three subview controllers. The master and first detail views are fairly standard with fixed behaviors. The second detail view needs to change according to the selection in the first detail view. The second detail controller is a simple view controller, which will respond to selection changes in the first detail view by installing a new subview and

Why can't I connect my menu to my view controller IBAction?

断了今生、忘了曾经 提交于 2019-12-09 16:28:43
问题 I have a document based application. I have just created menu items in the storyboard and IBActions in my view controller. However the usual way I connect an action to a target doesn't work -(IBAction) markAsHidden:(id)sender; -(IBAction) markAsVisible:(id)sender; -(IBAction) toggleHidden:(id)sender; Here is what I see when from my menu item I press Ctrl and mouse click from menu to View Controller. It does not show my IBActions. Any idea ? My 2 cents guess is that it has to do with the app

How to embed a storyboard view controller in an NSScrollView OS X (10.10) to make a complex inspector view?

老子叫甜甜 提交于 2019-12-08 03:30:04
问题 I'm looking at WWDC 2014 video, "212: Storyboards and controllers on OS X". In this video they claim that Pages UI does/could be arranged using Storyboards on OS X (see below). However, in Pages UI the inspector view is very long and is embedded in a scroll view (you can verify this my two-finger scrolling in Page.app inspector view), also some inspector items are themselves contained in (some type of custom) disclosure view. It doesn't seem to be possible to embed a storyboard view

Storyboard doesn't contain a controller with identifier 'MainWindow'

最后都变了- 提交于 2019-12-07 02:32:30
问题 I am trying to instantiate an NSWindowController from a storyboard in my OS X app: NSWindowController *mainWindowController = [[NSStoryboard storyboardWithName:@"Main" bundle:nil] instantiateControllerWithIdentifier:@"MainWindow"]; But this is what I'm getting: Storyboard (<NSStoryboard: 0x618000008500>) doesn't contain a controller with identifier 'MainWindow' . But in the storyboard: It is set. No, there are no other storyboards. Yes, I've tried cleaning the project and the build folder,

Why can't I connect my menu to my view controller IBAction?

我的梦境 提交于 2019-12-04 02:59:12
I have a document based application. I have just created menu items in the storyboard and IBActions in my view controller. However the usual way I connect an action to a target doesn't work -(IBAction) markAsHidden:(id)sender; -(IBAction) markAsVisible:(id)sender; -(IBAction) toggleHidden:(id)sender; Here is what I see when from my menu item I press Ctrl and mouse click from menu to View Controller. It does not show my IBActions. Any idea ? My 2 cents guess is that it has to do with the app being document based but... not really sure Why can't I connect my menu to my view controller IBAction?

OS X storyboard calls viewDidLoad before applicationDidFinishLaunching

血红的双手。 提交于 2019-11-29 04:07:42
I created a Mac OS X application in Xcode using storyboards. For some reason the applicationDidFinishLaunching method in the AppDelegate is being called after viewDidLoad in the NSViewControllers. As with iOS apps, I thought viewDidLoad is supposed to be called before applicationDidFinishLaunching ? Do storyboards in OS X apps initialize the view controllers before the app has finished launching? I am using the applicationDidFinishLaunching method to register default settings into NSUserDefaults. Unfortunately, registering the default values is happening after the views in the storyboard are

OS X storyboard calls viewDidLoad before applicationDidFinishLaunching

牧云@^-^@ 提交于 2019-11-27 22:17:55
问题 I created a Mac OS X application in Xcode using storyboards. For some reason the applicationDidFinishLaunching method in the AppDelegate is being called after viewDidLoad in the NSViewControllers. As with iOS apps, I thought viewDidLoad is supposed to be called before applicationDidFinishLaunching ? Do storyboards in OS X apps initialize the view controllers before the app has finished launching? I am using the applicationDidFinishLaunching method to register default settings into