interface-builder

NSWindowController circular dependency caused by bindings?

Suppose you have a window nib, owned by a NSWindowController which loads the nib. The NSWindowController has an IBOutlet bound (via Interface Builder) to a UI control on the window. Is it true that you can't dispose the window controller by releasing it because the binding causes a unbreakable circular dependency between the window co...

how do I use UIScrollView in Interface Builder?

While I've used UIScrollView successfully in the past by manipulating it programmatically, I'm having trouble getting it to work by setting it up exclusively in Interface Builder. I have a simple "about" page in my iPhone app. It has a UITextView, some icons, and links to my other apps. I have added all of these views to my UIScroll...

Add images to window with AppleScript Studio

How do you add and manipulate images on a window with AppleScript Studio? Ideally I'd like to have an image display on the window and change it to a different image using applescript. I've added an image view in interface builder, but that's about as far as I have gotten. ...

Using IB to add a UISegmentedControl to a NavigationBar

I'm current creating a UISegmentedControl programmatically in a view controller's viewDidLoad method and adding it to the view controller's navigation bar by assigning it to self.navigationItem.titleView. That's easy enough, but I'd like to be able to do this in Interface Builder as well and so far haven't been able to figure out how. ...

Adding a combo box or drop-down list to UIView

I need to add a combo box or drop-down list to a UIView. I did not find such an object in the "Library" of the interface builder. How do I add this object to my UIVIEW? Do I have to inherit it from another object (which one?) or do I have to create it from scratch programmatically? Please help !!! ...

Interface-Builder outlets causing odd display behaviour

I've been working today on adding a sheet to the main window of my application. After having trouble seperating the two (main view/controller and sheet view/controller), I've gone with just having both views in the same xib and both controlled by the main controller. Now that it appears when the beginSheet method is called, I've designed...

How can I keep drawing my GLView while messing around with other views (like scrolling a picker wheel)

My app has two views, one holds the OpenGL context which is constantly redrawing itself (through an NSTimer) and the other holds a picker wheel. While I'm spinning the wheel, it seems that the timer stops firing. Is there some method I could override for the picker view to manually call the draw? Or some way to keep the timer firing? ...

Does an IBOutlet needs to be a property & synthesized?

In most examples I see the following setup of IBOutlets: (Example A) FooController.h: @interface FooController : UIViewController { UILabel *fooLabel; } @property (nonatomic, retain) IBOutlet UILabel *fooLabel; @end FooController.m: @implementation FooController @synthesize fooLabel; @end But this works also fine (notic...

How to use NSCollectionView and Outlets properly?

Hey there, I'm desperatley trying to connect controls of NSViews which will reside in a NSCollectionView using outlets. The collection view is feeded using an NSArrayController. I created the NSView in a seperate NIB file and in the implementation of NSCollectionViewItem I overwrote copyWithZone to load it: -(id)copyWithZone:(NSZo...

IPhone SDK: Using Interface Builder to link arrays

Hi everyone, I´m trying to use Interface Builder (IB) to gain time in my app development. So I´m trying to do new things, for example, connecting objects between File´s Owners and Controllers. The situation is: 1 - I have a ViewController with a Nib. This view controller have an array set as a IBOutlet. 2 - I put a custom TableViewCo...

Cocoa bindings: combine fixed items with ArrayController bound items in an NSPopupButton

I'm trying to make a color chooser using an NSPopupButton, and at the bottom i'd like a separator and a "Custom…" option. Is it possible to load the colors from array, then tack the separator and "custom" item on bottom? if so, how? Thanks! ...

iPhone screen resolution changes in future hardware

Hi all, Something I've been concerned about for a while as I'm developing my applications is the oft hard coded geometry of images and view components that take for granted the 320x480 nature of the current display generations. I've seen many answers in StackOverflow and in examples / tutorials that hard code in the screen dimensions. ...

Cocoa Interface Builder's 'Attributes Inspector' like window

Hi all! I'm making a Cocoa application, and I would like a panel like the 'Attributes Inspector' in Interface Builder. So with big tabs on the top and collapsable/expandable groups. Does anyone know how I can do this? This is an image of the Attributes Inspector: So I actually want to make a window like the one shown in the image ab...

Does Custom UITableViewCell nib requires a Custom OBJ-C class as the file owner ?

I'm trying to figure out how to implement custom UITableViewCell as nib... I know how UITableView works but implementing custom cell with Interface Builder NIB add to the complexity... but help flexibility.... Si my question is this: After designing the custom cell in Interface Builder, do we need to create a Obj-C custom class to be a...

Scroll bars in NSTokenField

Is it possible to get scroll bars on an NSTokenField when there are too many items to display? I've tried embedding it in a scroll view but it doesn't work. Thanks ...

How do I add UIBarButtonItems to a UIViewController.toolbarItems property using Interface Builder?

I'm trying to use Interface Builder to add UIBarButtonItems to the toolbarItems property of the UIViewController. I have a .xib file and the File's Owner is typed as a subclass of UITableView controller ("ServerTableViewController"). I've dragged a bunch of UIBarButton items into the .xib file thinking that they will show up as part of ...

Is addSubview:view needed if I create the view hierarchy in Interface Builder

I have succesfully created a view hierarchy programmatically. I now want to replicate this hierarchy using Interface Builder (IB) instead. In IB I have nested a UIView within the main Window. Do I now nolonger need the following in method applicationDidFinishLaunching:application: [window addSubview:controller.view]; [window makeKeyAn...

How does Interface Builder know about UIViewController's view?

UIViewController has an ivar (and @property) called view. It is not however, an IBOutlet. When creating a view nib in Interface Builder, you typically set File's Owner to be your UIViewController (or subclass thereof), and you wire the nib's view to File's Owner's view outlet. How does this work if the UIViewController view member isn'...

IB complains that a new window has contents that go off screen

Interface Builder gives me a warning about the set up of my .xib file. It says, in a dialog called "MainMenu.xib Info", Object: Window ID: 21 Type: Illegal Configuration Issue: This window's content rectangle does not lie entirely on the screen with the menu bar and may not be completely visible for all screen resolutions and configur...

Interface Builder: Failing to display TabBarController when calling from TableViewController

A buddy of mine asked for a quick sample of code for an app skeleton that would use a TableView to call a TabView. I estimated an hour. After more hours than I want to admit messing around in IB, I gave up and implemented the following code. Can anyone tell me how to do this in IB? I was careful (I thought) to make all the right conn...