nsviewcontroller

QLPreviewPanel in tableview with issue: “has no controller”

我怕爱的太早我们不能终老 提交于 2019-12-24 04:51:59
问题 I would like to display the urls from a table view in a QLPreviewPanel but i got this error: [QL] QLError(): -[QLPreviewPanel reloadData] called while the panel has no controller - Fix this or this will raise soon. My table controller already conform to this two protocols : QLPreviewPanelDataSource, QLPreviewPanelDelegate. How can i set the controller of [QLPreviewPanel sharedPreviewPanel] as my table controller? - (void)didPressSpacebarForTableView:(NSTableView *)tableView { NSLog(@"Spacebar

QLPreviewPanel in tableview with issue: “has no controller”

半城伤御伤魂 提交于 2019-12-24 04:51:52
问题 I would like to display the urls from a table view in a QLPreviewPanel but i got this error: [QL] QLError(): -[QLPreviewPanel reloadData] called while the panel has no controller - Fix this or this will raise soon. My table controller already conform to this two protocols : QLPreviewPanelDataSource, QLPreviewPanelDelegate. How can i set the controller of [QLPreviewPanel sharedPreviewPanel] as my table controller? - (void)didPressSpacebarForTableView:(NSTableView *)tableView { NSLog(@"Spacebar

first mac app - push viewcontroller

无人久伴 提交于 2019-12-23 01:35:12
问题 I have a question, I do some iphone application and now I want to do a little mac application. From a clean application I add a button on MainMenu xib, than I add a NSViewController to MainMenu (from IB) with one Action. I create a new NSViewController (FirstViewController) with a nib file and a button. Now I want only to create a function to push FirstController from MainMenu and a simple function to push MainMenu from FirstController. something like this ViewController = [[ViewController

How to make embedded view controller part of the responder chain?

ぃ、小莉子 提交于 2019-12-22 10:48:22
问题 I am developing a Mac app using storyboards. I have a window that presents an NSViewController as its contents, which contains a "container view controller" that embeds an NSSplitViewController . The expected behaviour is for the NSSplitViewController to be part of the responder chain, such that a menu item that triggers the toggleSidebar action on the first responder actually collapses the item of the NSSplitViewController that's marked as a sidebar. However, this simply does not happen and

NSWindowController/NSViewController “Presentation” setting in Storyboard

≡放荡痞女 提交于 2019-12-21 07:02:16
问题 What exactly does the Presentation option(in Attribute Inspector) do in StoryBoard for Cocoa. It gives two options to select from Single Multiple P.S When googled the title, results are related to powerpoint presentation 回答1: The presentation style affects "Show" segues. Possibly it affects other segues too, but I only tested a Show segue. I tested on OS X 10.10.5 (Yosemite) with Xcode 7.1.1. If a window controller's presentation style is "Multiple" (the default), then a Show segue to the

Swift + NSViewController background color (Mac App)

时间秒杀一切 提交于 2019-12-20 17:24:29
问题 I am trying to change the background color of my View. The View Controller class is NSViewController type. How this can be done? In iOS UIKit ( UIViewController ) there is self.view.backgroundColor , but NSViewController doesn't have that. And second problem is how can I change the color of the applications Title Bar? I think the background color doesn't affect to that. Mac application, language Swift. XCode 6.1. 回答1: I managed to change background color of main view. NSViewController does

Binding selection across multiple view controllers in a single window interface

耗尽温柔 提交于 2019-12-19 04:49:06
问题 I am having an issue wrapping my head around how to hook up a few NSArrayControllers across two view controllers. I want to sync the selection in the source list table view to update the values in the second detail view controller. I'm using the Cocoa Dev Central Build A Core Data Tutorial as the starting point, but have broke down the architecture so that there is an NSWindowController that contains two NSViewControllers: one for the posts table on the left and one for the post details on

NSViewController and multiple subviews from a Nib

你。 提交于 2019-12-17 17:28:30
问题 I'm having a difficult time wrapping my head around loading views with Interface Builder and NSViewController. My goal is to have a view which meets the following description: Top bar at the top (like a toolbar but not exactly) which spans the entire width of the view, and a second "content view" below. This composite view is owned by my NSViewController subclass. It made sense to use Interface Builder for this. I have created a view nib, and added to it two subviews, laid them out properly

Instance variables lose value after initWithNib and before IBAction in NSViewController

混江龙づ霸主 提交于 2019-12-12 13:35:24
问题 I have a very basic initialization problem with an OS X app I am writing. I am initializing instance variables in initWithNibName in my NSViewController. However, these variables lose their value and end up being equal to nil by the time I access them in my IBAction methods. Here is my code. I have an application that has 1 main window, and 1 NSViewController. The app delegate is programatically calling initWithNibName in applicationDidFinishLoading. The view appears, and the button in the

How do I disable drag and drop on NSTextView?

左心房为你撑大大i 提交于 2019-12-11 11:38:10
问题 I have a NSWindowController that contains several NSViewControllers . I would like to universally accept drag and drop events with the NSWindowController class and not be intercepted by other views such as NSTextView (contained in a NSViewController ) How can I tell NSTextView to ignore the drag & drop event? 回答1: I found out that there were two things needed to skip past NSTextView 's interception of the drag and drop event. In the NSViewController containing your NSTextView : - (void