interface-builder

NSMenu with IBAction method for clicking the menu header?

How can I capture the selection of a NSMenu header with an IBAction method created in connection with interface builder? I am not sure "header" is the right word so see the image below: Is it possible to create an action for this the way you can with the selection of regular NSMenuItems? I can create the relationship in interface bu...

Dynamic text labels in NIB file

Hi Guys I created a nib file and want to display dynamic text messages on it like file names that are selected or the no of files selected etc. Is there a way to to this? I know this can be done for alert panels but i want it on my custom sheets. Thanks ...

Why is IB changing the object IDs when opening a xib file?

Hi, I have the same problem with some xib files in different projects on different macs. IB is changing the Object IDs of some views in my xib file. I need only to double click the xib file from Xcode to open it in IB and then try to close the xib file again without changing anything and IB marks the xib file as dirty so that I have to ...

How to add a custom iPhone UI element that is not an IB component?

I'm trying to create an application that uses the iPhone MapView (under Google Code). I can't figure out how to integrate this thing into my application without handwriting the entire UI, ie not using the IB at all. How can I use the Interface builder to create all of my menus and such but add the MapView in? Do I need to edit the MapVi...

What's the missing step/information in this iPhone Interface Builder tutorial?

I'm following a tutorial on how to use Interface Builder from Chapter 2 of Zdziarsky's "iPhone SDK Application Development." The idea appears to be to create a very basic app which consists of a Tab Bar Controller which has two buttons, each tied to a different view object (and each view object in its own respective .xib file). What I en...

Creating glossy icon-buttons like on the home screen via interface builder?

Is there a way to create buttons similar to the glossy icon-buttons on the home screen on the iphone but in your own app? The only thing i've found to create image button is to create rounded rect-buttons and set the image or background property on it, but that does not automatically create the glossy surface and rounding. ...

Cocoa core data self referential interface builder question

Hi there, I'm having trouble understanding how to get the following working in interface builder. I've created a Core Data model class "Person" that has a number of attributes (first name, surname, etc.) and a relationship to other persons (friends). Conceptually this is very simple. However figuring out how to get this working in IB ...

How do I hook up a button in the UINavigationBar?

I dropped a UINavigationBar onto the XIB form. Then I dropped a UIButton on the form (not on the NavigationBar). I changed the type to InfoLight (so that it looks like an Info symbol). I then dragged the UIButton onto the UINavigationBar and set it to be the right button. It magically changes the type from UIButton to UIButtonBarIt...

How are objects defined in an XIB file and how are they created at runtime?

I've just purchased a Mac and am beginning to explore software development using Cocoa and Objective-C using XCode in Snow Leaped having come from a strong Microsoft and C# backgrund All of the documentation and tutorials I have read use Interface Builder and XCode to create applications with user interfaces. My current understanding is...

See a white band at the bottom of screen while adding view to window programatically in iphone?

Hello all, When I developed a view based project in XCode, My view works fine. But when I use a window based project and create a view on my own and try adding it as a subview to window, it gives me a white band at the bottom. I never faced this issue before but facing it first time. Anyone having a solution? Tnx in advance. ...

Can I set a UILabel to expand to fit an arbitrary amount of text?

This question is more for development purposes and would never be used for a shipping app. I need to do a quick and dirty UILabel whose text field I can point to a really, really, long string. Really long. I've ben futzing in IB and can't figure out the correct magic handshake to allow a UILabel to balloon to a really large size. Does an...

What are the IB objects used in Mac OS X's Address Book?

Does anyone know what are the types of UI objects used in Mac Address book to edit the address components? I have started my first Cocoa application and in many instances I would like to have this look and feel as opposed to simple table views. ...

UITextField Being Non-Compliant Crashes App

Hi Everyone: I have a very simple class (shown below), however every time I run it, it returns: Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key field1.' I am drawing this nib file to the screen in the following way: UIVi...

Framing problem with iPhone UIView subviews?

Hi, why can't I get my programmatically created UIScrollView (or plain UIViews) to sit where I want them? I am building a viewcontroller component that builds up a uiscrollview and adds it as a subview to placeholder UIView that was dropped in the design using IB. the main view, with UIView IBOutlet 'ibView' linked to the placeholder v...

Tool for viewing structural xib differences?

Is there a diff tool for viewing differences in XIB's? It could display what graphical elements are in one xib while missing in other? ...

UIButton Background Images appear lighter in Simulator than in IB

Just put a background image on a button. The looks fine in IB but when I build and run the project in Simulator the bg is noticeably lighter. Anyone know why could be? Thanks! ...

How set a UIView subview larger then its parent superview in IB?

Can someone please reveal the secret handshake in IB to allow a UIView subview to exceed the bounds of its parent superview? Cheers, Doug ...

NSCollectionView: Can the same object not be in the array more than once or is this a bug?

I may be doing this all wrong, but I thought I was on the right track until I hit this little snag. Basically I was putting together a toy using NSCollectionView and trying to understand how to hook that all up using IB. I have a button which will add a couple of strings to the NSArrayController: The first time I press this button, my...

How to get Transparent Accessory View in UITableViewCell? (w/ Screenshot)

I use a custom UITableViewCell from a nib. The accessory view is a Detail Disclosure Indicator . The problem is that the background color of the UITableViewCell behind the accessory view is not getting rendered (see image / source below). Any clues? Also, here are some things that I tried but did NOT work: Things that DID NOT work: - Se...

Binding NSSlider to NSTextField with nil minValue?

I have an NSSlider bound to a text field to display the value given by the slider. Everything works, but I would like the NSSlider to send "nil" as minValue to the object. For example, I can convert it to nil when saving (to a propertylist): if ([myOb intValue] > 0) [myDict setObject:... forKey:...] But I would like to apply sa...