interface-builder

Very basic problem with Tab Bar Application and Interface Builder

OK, here is how to re-create the problem had: Create a new project, using the Tab Bar Application Add a UILabel within SecondView.xib Add IBOutlet UILabel* myLabel; to FirstViewController.h Connect up myLabel in IB. Build and run. When I click the second tab the app crashes with: __TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION__ ...

UITableViews in Interface Builder

I'm having trouble creating a UIView (in Interface Builder) that contains a UITableView with some other object, such as a UIButton or UILabel. The UITableView always takes up the maximum amount of space in the UIView, regardless of the size of the UITableView object itself. The File Owner is a standard UITableViewController. ...

Image vs Background image for UIButton

I have an image that is 480x331 and has a transparent background. The transparent part is just around the image's edges. My UIButton is 72x37. When I set the image as a background image in IB for the button, the transparent edges of the image show as white in the button. Without an image, the button is white with rounded corners. I'...

How do I load a UIViewController from a NIB with placeholders?

I have a UIViewController that I want to load from a NIB that has a proxy (placeholder) object defined in it. The first time I load it, I go through this rigamarole: MyViewController *screen = [[MyViewController alloc] init]; NSDictionary *proxyDict = [NSDictionary dictionaryWithObject:myObject forKey:@"MyProxy"]; NSDictionary *option...

Why does it feel like Interface Builder just gets in my way?

I'm very new to Cocoa for MacOSX, but I can't help but feel like I'm constantly fighting Interface Builder. My current situation is that I'm building an app that will have several custom controls and views. I started building the app in Interface Builder because it was initially very easy to drag things around and get them into the corr...

XIB File Not Loading Properly In Interface Builder

I was creating a new View-based Application in XCode, adding some outlet and actions, using the IBAction and IBOutlet tags, into the automatically created controller view header file. I then double clicked the 'project_name_ViewController.xib' to launch the interface builder. However the outlets and actions did not appear in interface b...

Subclassing UIView or composing with UIView

I'll start by saying what I want to do because I'm unsure if I'm asking the right question. I'm making a grid based map and am going to hold an array of objects to keep the state and presentation of the map. Each object will be of a Tile class. Should I be subclassing UIView or sublass NSObject and have an ivar of UIView. I was also plan...

IBOutlet and IBAction

What is the purpose of using IBAction and IBOutlet in Objective-C coding for the iPhone, does it make any difference if I don't use them? ...

Hidden Features of Interface Builder?

What are some uncommon or "hidden" features of Interface Builder you wish you would have known about when first learning Xcode + Interface Builder? Edit: Xcode specific tips here. This question is specifically concerned with the GUI and not so obvious features of Interface Builder. And only tangentially related to Xcode. ...

UITextField where to set clearsOnBeginEditing

I'm really used to VS where all properties are nicely listed in a big dialog. In Interface Builder I can find no such dialog. If I want to set the clearsOnBeginEditing field of a UITextField to FALSE, where is the best place to do it? Is there an interface to a control's properties in interface builder that I'm just missing? ...

Is it possible to directly edit the XML of XIB files?

I tried to do it, but Interface Builder refuses to open the resulting file: "Interface Builder was unable to determine the type of [file name]" ...

Can't understand iPhone view layout

I have an iphone app that I built based off a tutorial (for a different framework so I had to modify things a bit) that uses a TabBar and a NavigationBar on the same View that also contains a UITable populated from an SQLite db. I built it last night and when you select an item in the UITable it was redirecting to a view that displayed t...

How to remove bottom bar from NavigationView/TableView

I have an app that has a TableView, NavigationView and TabBar running together. There is a bar along the bottom of the screen above the TabBar that looks exactly like the NavigationBar at the top of the screen. I have no idea what it is or how to get rid of it. Here is what it looks like with what I want gone crossed out: This is the ...

UIImageView not showing

I changed a .png that I was using for an UIIMageView that I added using InterfaceBuilder. Now, when I run the app in the simulator, the image does not show. I have tried removing the reference and re-adding and even creating a new image altogether and nothing seems to work. PLEASE HELP!!!!!!! ...

Replace Xcode's Navigation template UITableViewController with a UIViewController and UITableView

Is there any simple way to replace a UITableViewController from Xcode's "Navigation based application" with Core Data with a UIViewController containing a UITableView? I'm looking to add things that the normal UITableViewController can't have, so I replaced it with a UIViewController, but my problem is that whenever I do replace the UIV...

Custom UIView built with Interface Builder accessible/positionable via Interface Builder

This shouldn't be this confusing. I have a custom UIView with a bunch on controls on it. UILabels, buttons, etc. I've created this Nib using Interface Builder. I want to be able to position this custom uiview on another UIView using the interface builder. How do I link my UIView custom class, to the nib? initWithCoder gets called, ...

An IBOulet for an NSArray size in a Non-Controller Class

I have a class along the lines of: @interface Foo : NSObject { NSMutableArray *bar; } Foo isn't a controller -- it's responsible for some other logic that I want encapsulated. I'd like to have a label display the size of bar. If it was a value in a controller, I could simply make it an IBOutlet, connect it in IB, and everythin...

PNG transparency in Interface Builder

I'm adding an Image View in Interface Builder with a transparent PNG (A logo in the Navigation Bar) but the transparent pixels seems to render as white.. I searched for PNG in Interface Builder but no luck. any tips? ...

Toolbar items in sub-nib

This question has probably been asked before, but my google-fu must be inferior to everybody else's, cause I can't figure this out. I'm playing around with the iPhone SDK, and I'm building a concept app I've been thinking about. If we have a look at the skeleton generated with a navigation based app, the MainWindow.xib contains a naviga...

iPhone Navigation Bar button, using custom image, done with Interface Builder

iPhone application, which has two buttons -right side- of Navigation Bar title. I want to do this completely using Interface Builder and have had some limited success. The current problem is with buttons using custom image. All built-in images are ok, e.g. Info Light or Add Contact. Custom image just won't get visible. Type: custom Ti...