interface-builder

Does Interface Builder use the -init method to initialize view controllers?

I have setup tab bar controller using interface builder, and each tab bar item is linked to a view controller (4 tabs, 4 view controllers). I want to know if Interface Builder uses an -init method to initialize the view controller because apparently this method does not get called: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(...

How do you display custom UIViews in InterfaceBuilder?

I seem to enjoy designing new UIViews and UIControls that implement their own: - (void)drawRect:(CGRect)rect; function. This work well for me, especially when composed using UIViews in Interface Builder. But composing them in Interface Builder is annoying because they just show up as boring rects with backgroundColors. Boring. It wo...

UINavigationBar tintColor with gradient

I'd like to change programmaticaly the tintColor of a UINavigationBar and keep the gradient as in Interface Builder. When I change the tintColor in my code, the gradient disappears but when I change the tintColor in Interface Builder, the gradient is kept. Any ideas? ...

Preserving window position in Interface Builder

Is there a way to preserve window position in Interface Builder? Every time I reopen a nib file, the MainWindow.xib window finds its way back to the top left of the screen, behind the window containing the interface I'm laying out. Moving it back to where I had it before every time is starting to get on my nerves. Seems like there should...

Is it possible to initialize a UINavigationController subclass from a NIB ?

I have a UITabBarController based application. The tabs will be created from database entries, so I don't know them in advance. I'd like to programmatically initialize a UINavigationController subclass (I have a few different kinds) for each tab. Ideally, I would really like to draw the whole UINavigationController subclass + it's subv...

-[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] inquiry

I have a NIB file with a UIView, a couple of UIImageView's (including a logo) and a UITableView inset within the UIView below the logo where I allow users to input a username/password to login to my application. I also have a third arbitrary UITextField within a UITableViewCell below the username/password. The problem is, when it is clic...

Can you set a navbar's edit button in Interface Builder?

It's easy enough to set up a table view to allow editing. Just add one line to your UITableViewController: self.navigationItem.rightBarButtonItem = self.editButtonItem; This line adds an edit button on the nav bar that will change the table to editing mode and change its button text to "Done" while editing. Is it possible to set this...

binding NSTextField to NSNumber

I'm trying to use an NSTextField for integer user input. The text field is bound to an NSNumber property and in the setter method I cleanup the input value (make sure it's an int) and set the property if necessary. I send the willChangeValueForKey: and didChangeValueForKey:, but the UI doesn't update to the new values while that text fie...

How should I structure this application?

I am writing an iPhone application which requires the user to enter their mobile no and pin code and press an accept button before they continue into the application. Previously I had (each view is in a different Xib) AppDelegate - if {registered add load RootView (which is main view) into NavigationController} else {load RegistrationV...

iPhone: one nib, different assets. Bundles?

I have an iPhone application that comes in differently skinned flavors, with different art assets and sounds, but all the same code. I've got things set up with multiple targets, but the problem I'm having is I have to have a different set of UIBuilder nib files, one per view per target, set up to point to the correct art for that targe...

How to implement gradient button bar in Cocoa

Some Cocoa applications (for instance, Mail and Automator) have a special control usually in the bottom of their window: Could you share the best practices of making the same action bar with standard images and popup buttons? Thanks. ...

How can I connect UIPickerView in my app using Interface Builder?

Hello, I am developing a iPhone (Utility Application) app using Xcode and Interface Builder (IB). I am using a UIPickerView in my app using IB. But I dont know how to connect UIPickerView in my app. Its show a empty picker. How can I connect data in UIPickerView? Plz tell me details... ...

Creating a navigation view in Interface Builder

I'm trying to create a navigation view in the Interface Builder. It's not in the MainWindow.xib, so the relevant sample project on the Apple Dev. site is useless. The most logical (and cleanest) way to approach this seems to create a Xib-file where the File's Owner is a subclass of UINavigationController - however, I cannot get this to ...

Filling width in (iPhone) UIWebView landscape orientation?

I'm using a UIWebView with text in it. When the iPhone is rotated to landscape, text doesn't fill the now wider UIWebView width. I'm using P (paragraph) tags, which should not affect content filling landscape's width. The line breaks that are visible in portrait remain the same in landscape. In Interface Builder, I haven't changed an...

Interface Builder vs. What's Displayed on iPhone

Hello and thanks for giving this question a gander. It seems that PNG files that I drag/drop into IB do not display in the same manner that they are shown in the iPhone simulator. What gives? For example, if I want to drop in a PNG with rounded corners, IB shows hard rectangular corners but when I build to the simulator, I see the roun...

Installing IB plugin

I have created IB kit plugin now i want to use that plugin in other Xcode project how to do that? I have tried developers guide but not able to get that done ..please answer ...

Extending the attributes inspector in interface builder

Is it possible to extend the interface builder's attribute inspector with additional attributes for custom classes inheriting from UIView? ...

UITextField changing font size via Interface Builder

I've been trying to adjust the font size for a UITextField that's embedded in a contentView of a UITableViewCell. I'm using cmd+T to bring up the font menu, and in there am using just the default font Helvetica size 18. Everytime I change the size it doesn't seem to make a difference at all when my UITextField is displayed. It's almost a...

How to set UITableView to Grouped?

In an iPhone navigation based app, I want to add a second tableview but have its design available in IB. I've added a new empty XIB and dragged a UITableView onto it. I want to setup the layout through IB. I've created a controller for this tableview and set the File's Owner class in IB to this controller. I linked the tableview to F...

Binding two different model-key-paths to the same NSArrayController selection

Say I have the following array of dictionaries: { { isoName => en, fullName => English, localName => English }, { isoName => de, fullName => German, localName => Deutsch }, { isoName => fr, fullName => French, localName => français } } How ...