I'm getting back in to Cocoa development on the Mac after a long stint doing iPhone work. My previous experience with Cocoa on the Mac has just been dinky little tools. I'm looking to build something serious.
Looking at a modern Cocoa application like iPhoto (or Mail or Things or....) many apps use the Single-Window, Source-List based a...
I must be missing something simple, but I can't see it. First, the setup:
DATreeView, a subclass of NSView
DATreeViewController, a subclass of NSViewController
MainMenu.xib has an instance of DATreeViewController, which is configured to load a view from DATreeView.xib
MainMenu.xib also has an instance of DendreaAppDelegate, which has ...
All I need to do is load and swap some nibs in a NSView of a window. I know how to do it with NSViewController and have it working perfectly with 10.5-10.6, but I don't know what to do for 10.4.
Tutorial links very welcome, I have trouble finding legacy stuff.
(Yes, I really do need to support 10.4.)
...
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 m...
I've subclassed NSViewController with IBOutlets hooked into an NSButton in a secondary nib.
I can instantiate the NSViewController and apply the view in an NSMenu -- it works great -- but how do I access the button to change its title?
Since the NSViewController has IBOutlets, I assumed I'd do this through the controller.
//this part ...
I have basic *.xib file, which have NSView.
How can I use another nib files for this Custom View? What is NSViewController and how should I use it?
...
I've started to move to using NSViewControllers and I can't for the life of me figure out how to get content from a CoreData entity to a TableView (for example) through a NSViewController?
...
Hello, I try add subview but not work. My code is:
HomeViewController* homeViewController = [[HomeViewController alloc] initWithNibName:@"HomeView" bundle:nil];
NSViewController *viewController = homeViewController;
[mainView addSubview: [viewController view]];
NSLog(@"%@",[viewController view]);
NSLog(@"%@",[[viewController view]superv...
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 ...
I'm developing a Cocoa desktop application that uses a source list in the style of iTunes: different elements in the source list cause the main content area to display different views.
The content area is entirely filled with a (vertical) NSSplitView; on the left is an NSOutlineView source list. When the user selects an item on the left...
I have a view which contains a few subviews:
mainView
subViewA
subViewB
SubViewC
mainView is an NSView constructed from a nib and is controlled with an NSViewController subclass. The subviews are standard views such as NSTextField and NSImageView and are configured to be non-editable. I want mainView to receive rightMouseD...
How can I add a subview when the new view is in a different xib file?
The class for the different nib is an NSViewController and I'm using self = [super initWithNibName:@"NewView" bundle:nil]; to load the nib
Can I just do something like:
NewView *nv = [NewView new];
[oldView removeFromSuperView];
[mv addSubview:[nv theView]];
or do...
I have an NSView (we'll call it view1) that is from an NSViewController. The Super view (which we'll call view2) is located inside an NSWindowController. The problem is, I can add view1 to view2, but I can't remove it.
...
So I'm beginning to learn how to use Cocoa. I think I've pretty much got it but I'm hung up on creating and switching views. I'm rewriting a game I made a little bit ago for practice. All I want is one window (preferably not resizable) and I want to be able to switch out views for different screens in the game.
First, I have the main me...
This is actually a two part question, hope my explanation is clear:
I have an NSViewController which can be configured to show a different custom view on part of its view. For example, its view can show either CustomViewA or a CustomViewB.
I was able to make this work by creating an NSViewController for each of the custom views and ini...
In order to categorize a wide variety of unique views, I have an elaborate setup: main categories are selected via a toolbar, and then specific panes are selected in a category's NSScrollView. This looks like: window -> NSViewController controlling five views -> sub-NSViewController for each view controlling X views -> each view contains...
I am having some problems implementing QuickLook functionality from a table in an NSView. The limited documentation on QuickLook really doesn't help at all.
After reading through the Apple Docs (which are geared heavily towards custom generators and plugins), I ended up looking at the QuickLookDownloader sample code. This code is based ...
I have this code to load an NSView from a NIB and add it to another NSView:
// INIT
- (void)awakeFromNib {
// Load nib
DNListViewController *listViewController = [[DNListViewController alloc] initWithNibName:@"ListView" bundle:nil];
// Add view to window
[listViewController.view setFrame:detailView.frame];
[detailView addSubv...
I am trying to create a custom view and load it into a window.
In the end, I know there will be a few steps to follow, reflecting the key relationships that I am missing. I am hoping someone can explain, in a series of steps, how one creates a view object, view controller, associated .xib, and then loads it into a window (after clearin...
I have an NSViewController with its own nib that requires access to the managedObjectContext to display objects in a tableview. This is how I have the managed object context set up in my view controller:
@interface {
...
NSManagedObjectContext* managedObjectContext;
...
}
@property (nonatomic, retain) NSManagedObjectContext...