nib

iPhone app can find nib file when running in Debug configuration but not in Release configuration

I have developed an iPhone app using the navigation controller structure. The active SDK is set to iPhone Simulator 3.1.2 (Base SDK). When the Active Configuration is set to Debug, it works. However, when the Active Configuration is set to Release, the app crashes when it tries to load the second view controller. Here is error message: ...

How can I programmatically access UI elements in a NIB without 'wiring' them?

Hi - I'm contemplating writing some helper functions to make it easier to do simple changes to the UI elements in my iPhone NIB. Mainly - I want to access a UILabel, or other element, via it's Name in Interface Builder. Is this possible? Is there a smarter approach? Example Say I want to make a super simple iPhone app that displays ...

Reusable bits of interface, designed in IB

I'm making an app that includes the same group of buttons in many different contexts. The buttons send their actions to a different object in each context. I'd like to be able to design a single NSView in IB containing the buttons, and then be able to put copies of that view in many places in my nibs, while maintaining the link, so chang...

Two nib overlapped: how to interact?

Hy guys, i've a problem. I've two nibs, the one partially overlapped to other. Into the first nib there's a full interactive area (it's the big red button). Into the second there are two buttons (a visible one "button 2" and a hidden "button 3" that slides up when you press "button 2"). How can i click the "button 1" when i am into the...

How to get iPhone, not iPad view in Interface Builder

At first, I was not able to build a new blank project to iPhone using the new XCode 3.2 beta. I edited the project settings and was able to build the blank app to iPhone simulator. However, when I open the nib for the project in IB and click the view, it opens an iPad size view. How do I get the right sized view to work on in IB? ...

Easiest way to support multiple orientations? How do I load a custom NIB when the application is in Landscape?

Hi there, I have an application in which I would like to support multiple orientations. I have two .xib files that I want to use, myViewController.xib and myViewControllerLandscape.xib. myViewController.xib exists in project/Resources and myViewControllerLandscape.xib exists in the root project directory. What I want to do is use a sep...

Xcode Interface builder: How to connect NSObjectController.content to outlet of file's owner?

I have a nib file that contains a window/view and an instance of NSObjectController. I programatically load the window in the nib setting "self" as owner. "self" is my custom classs that defines an IBOutlet: an NSDictionary called settings. I now want to have that dictionary as content for the object controller. Is there a way to connec...

draw line over uilable after loading from nib

here is my code CGContextRef c = UIGraphicsGetCurrentContext(); CGContextBeginPath(c); CGContextMoveToPoint(c, 277.0f, 21.0f); CGFloat newpoint = 277.0f + (CGFloat)(self.msrp.text.length * 8); //NSLog(@"%f", newpoint); CGContextAddLineToPoint(c, newpoint, 21.0f); CGContextStrokePath(c); i am trying to draw a line over UIlabel, i am lo...

Loading a View from IB

This should be a pretty easy fix, but I haven't figured out from reading the Apple documentation or other SO questions how to do this simple switch from creating my Interface programmatically to using Interface Builder. I am basing my code around this framework: http://www.pushplay.net/blog_detail.php?id=27 The only difference is that,...

Load (and display) a .XIB from the web

I want to be able to download (via a NSURLConnection request) a .XIB file, and have it presented in a view. I have implemented the NSURLConnection, and surely enough, when the connection completes, I am left with a NSString of XML data representing the XIB file. Example: (just the first few lines of many) <?xml version="1.0" encoding="U...

How to load a UIView from a NIB?

I have been using UIViewControllers and initWithNibName with much success, basically using them as a convenient way to design the view with Interface Builder. Unfortunately I have built a hierarchy of views before noticing this line in the UIViewController documentation: Note: You should not use view controllers to manage views th...

How to close a window (unload a NIB)?

I have a custom NSWindowController subclass that loads a NIB file during initialization like this: self = [super initWithNibNamed:@"myNib"]; if (self != nil) { [self window]; } The nib contains some custom views and some other controls. The NSWindowController is the file's owner and at least one of the views even binds to it. Sim...

Tab Bar Application, one UITableViewController with different data.

I have a Tab bar App with four tabs. Each tab loads the same UITableViewController. I would like to fill the table based on which tab is tapped. How? ...

Reuse nib's across multiple UIViewControllers

I've created some custom UITableViewCells in a nib file and would like to use that across multiple UIViewControllers. Can anyone tell me the best practice way to do that? My limited knowledge around loading nibs seems to suggest that you have to specify a single owner class in Interface Builder. Thanks. ...

UITableViewCells loaded from NIB always nil

I'm trying to create a simple form using a UITableViewController as documented in the Apple Developer Documentation here: http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/TableView_iPhone/TableViewCells/TableViewCells.html What I'm trying to do is located in the section entitled: "The Technique for Stat...

Can a View Controller manage more than 1 nib based view?

I have a VC controlling a screen of content that has 2 modes; a normal mode and an edit mode. Can I create a single VC with 2 views, each from separate nibs? In many situations on the iphone, you have a VC which controls an associated view. Then on a button press or other event, a new VC is loaded and its view becomes the top level vie...

Loading NIB using [NSBundle loadNibNamed:owner:] but the window does not appear in the foreground

I wrote a menu application that has no persistent window or standard menu. When another application has focus and I use the menulet to trigger a window to be opened, it appears behind the foreground application (but above anything else that is present on the screen). Basically... -(IBAction)aboutWindow:(id)sender { [NSBundle loadNi...

awakeFromNib and loadView execute for different instances

Hi, I'm trying to understand why: NSLog(@"self = %p", self); in awakeFromNib prints a different value than the same NSLog in viewDidLoad? This isn't a huge problem because I don't need the awakeFromNib but I would like to understand how it works. The code that creates the controller is the following: MyViewController *myViewCo...

Fully-loaded UIViewController losing all it's data after adding to scroll view

Summary I'm repurposing Apple's Page Control project. In loadScrollViewWithPage:, the view controllers that I'm adding to the scroll view appear on screen without their initialized values, as if displayed directly from the nib. Specifics Here's the code that appears to be working when I step through it: CBFullScreenViewController *c...

How to add information to about screen of my cocoa app in Mac Os X

Hi All, I am pretty new in developing cocoa applications. I have developed a small UI application using cocoa. I wanted to add some information on about screen, currently it shows the app name and version which is 1.00. Can any one help me how i can add some information in about screen, is it possible to add information programmatically ...