interface-builder

When to create Interface Builder plug-in for custom view?

When do you recommend integrating a custom view into Interface Builder with a plug-in? When skimming through Apple's Interface Builder Plug-In Programming Guide I found: Are your custom objects going to be used by only one application? Do your custom objects rely on state information found only in your application? Would it be...

Esc and Enter keys in Cocoa dialog

How can I dismiss dialog in Cocoa application when user presses Esc or Enter key? I have OK button, is it possible to make it default button? ...

Connecting delegate classes in Objective-C

I've got two controls in my Interface Builder file, and each of those controls I've created a separate delegate class for in code (Control1Delegate and Control2Delegate). I created two "Objects" in interface builder, made them of that type, and connected the controls to them as delegates. The delegates work just fine. My problem is, I ne...

Using Interface Builder for UITableView's

I'm very early in the iPhone development learning process. I'm trying to get my head around various pieces. Right now I've just taken the basic NavigationController template and I'm trying to create a simple grouped table view with a couple of text fields. What I can't seem to do is to get Interface Builder to allow me to drop a UITab...

How do I hook up a referencing outlet in Interface Bulider for a UIImage?

I want to access a UIImage programmatically... i.e. myImage.hidden = TRUE; etc. I can do this fine for UILabel but when I repeat the process for UIImage it doesn't work. Specifically when I drag the blue line in Interface Builder over the icon I don't get a popup menu like I do when using UILabel. Perhaps using UIImageView instead of ...

Linking File's Owners and View Controller [iPhone SDK]

I seem to be having an issue with iPhone SDK 2.1 in as far as being able to establish a relationship between a ViewController and a View window. In as far as a Cocoa Touch Class, I went forward and added a UIViewController subclass. I made sure that the target is part of the existing project. Right afterwards I added a User Interfaces ->...

What's the best way to handle landscape/portrait differences in IB?

I have a view that supports landscape and portrait viewing, with the controls all moving around when you switch from one to the other. I'm currently doing this by setting the .center of each one of my controls when the user rotates the phone. The problem is that this is tedious, and requires a lot of code, and seems to defeat the purpose...

Generate View for iPhone application using interface builder.?

I wanted to generate one fix view using interface builder, but the size of that view is exceeding the size of iphone screen,and I am not able to maximize screen. I wanted to show table view in that screen. I did enabled scrolling but that didn't work, Update 1: Actually I wanted to show thumbnail image inside cell and i want to show 5 ...

Is it possible to design NSCell subclasses in Interface Builder?

I'm trying to subclass NSCell for use in a NSTableView. The cell I want to create is fairly complicated so it would be very useful if I could design it in Interface Builder and then load the NSCell from a nib. Is this possible? How do I do it? ...

How would one implement a sidebar similar to Mail/iTunes/Finder/etc in Cocoa/IB?

I think the title pretty much says it all... I'm looking to implement an interface similar to the standard OS X sidebar used in all the above mentioned programs, and I'm wondering if anybody has any thoughts as to the easiest way to do it, namely about what view to use for the left hand selection pane. Really I don't think I even need th...

Setting the background of NSBox to a gradient programmatically without subclassing

I want to set the background of an NSBox to be a gradient. In Interface Builder it is possible to set the background color of an NSBox to selectedMenuColor which is a gradient. NSBox only has a setFillColor method so how is Interface Builder filling it with a gradient? How do I programmatically fill an NSBox without subclassing it? I...

Interface Builder can't display 160dpi images correctly ??

Hi ! I'm developing an iPhone app. A simple image is the background of the main view. I've set an UIImageView in the background and set an image in, using IB. the image is a 160dpi PNG image. It appears like CRAP in IB. When running in the simulator it is ok, crisp. How am I supposed to work and place my controls precisely on a such p...

Who's responsible for creating the MainViewController instance in the iPhone NavBar example

I'm exploring the NavBar example from the iPhone dev center. More specifically, I'm trying to understand where the MainViewController object is instantiated and I simply can't find where this is happening. The only references to the MainViewController class is in AppDelegate, where there is a forward declaration and #import. However, ...

How to load viewController from a nib file

I have a Tab bar bases project (along with navigation control), inside a particular tab there is a tableViewLoaded , when i click on the table rows it shoud open another view , ie it pushes another controller , i have a view controller in the MainWindow.nib for this view also with some items like buttons labels , but whn i click it doesn...

How are binding specified for Interface Builder plugins?

I'm creating an Interface Builder plugin for an NSView subclass. I've been following the Interface Builder Plug-in Programming Guide but it's not answer all my questions. My class has one NSString property and 4 NSColor properties which I want to create bindings for at design time. I can't figure out where the bindings are specified in ...

UIView bounds with top bar

When creating a UIView with a navigation bar in interface builder, the top bar takes some space, but the view still has the same size. This mean that the bottom of the view is not visible. Is there a way to get the "visible size" of a UIView? I would like to show a subview at the bottom of the screen, but part of the subview is hidden...

Sizing a control to fit its container in Interface Builder

Let's say I have a split view, and I want to fill half of it with a table view (a fairly common use case, I would think). Is there any way to tell the table view to size itself to fit the split view or do I really have to size it manually? ...

Double UIView Navigation Bars

I made a UIView using Interface Builder with a top bar that has Cancel and Save buttons. But when the view is displayed in the simulator it has an extra Navigation bar below the one that I've designed on purpose. The extra bar has no buttons on it. Anyone has a clue where I can look to get rid of the extra nav bar? Update: While experim...

Interface Builder for iPhone tutorial

Anyone know of some tutorial material for how to use Interface Builder for iPhone development? I can find sample projects and stuff and that's extremely helpful, but they do not reveal how things where setup in Interface Builder. ...

How come iPhone Interface Builder doesn't let me set the X,Y coordinates of a top-level UIView?

How come the iPhone Interface Builder doesn't let me set the X,Y coordinates of a top-level UIView? (Meaning, a view whose direct parent is a UIViewController.) The X and Y boxes on the View Size tab are grayed out. I can change the X,Y values in code at runtime, so why not in the Interface Builder? Thanks. ...