interface-builder

Link with File's Owner problem

I created a nib file "WebViewController.xib". And try to link the UIView with File's Owner. But it doesn't work. Also sometimes with other nib files, I deleted a connection from View Connections->Referencing Outlet, then tried to connect again, but it can't link with File's Owner anymore. How to fix this? Thank you. ...

Using SWIG with a build system

Anyone have experience with using SWIG (the interface generator)? I have a C project which I would like to expose to a bunch of other languages/frameworks, like Python, Java, .NET, Perl, PHP, Ruby. I would like to integrate with my build system (which is CMake-based), but any method of accomplishing this will do. ...

Possible to initialize an entire UITableViewController (or subclass) from a secondary NIB... not just a UIView?

Nearly all the UINavigationController examples out there show the use of initWithNibName:bundle: to load a NIB containing NOT an entire UIViewController (or subclass) but just a UIView, with the NIB's File's Owner Class property set to UIViewController (or the appropriate subclass) and its view outlet pointed at the UIView. Why is this?...

XCode & Interface Builder not in sync anymore

Hello, it seems to me that ever since a recent upgrade to the latest XCode, some behavior changed. What Used to Be: Whenever I did a "Build and Run", XCode would ask me to save changes to the opened and changed documents in Interface Builder that belong to that project. Now: No questions asked, open IB docs are not saved, and the new...

How to add UIScrollView to Interface builder?

I have all my controls laid out in interface builder (many labels, buttons etc). How do I put them all in a scroll view in interface builder so that I can have more space and be able to scroll up and down to reveal more controls? Do I have to do this programatically? ...

IB and UIView. What is the correct way to load a view hierarchy from a nib?

Can someone please school me on the proper way to load a view hierarchy from a nib file. I am using the loaded view as a template to stamp out a family of views and the current approach I am using is subtly broken. I don't appear to be copy-ing or retain-ing when I should be. Here's the relevant code: // pageSet is a list of view tag nu...

How to drive Interface Builder with AppleScript?

I want to programmatically create NIB (or XIB) resource files - like resource import tool. Making XIB file manually is not impossible, it is XML-based file, but there are too many unspecified items. So, I'd like to use AppleScript to drive IB itself and create the resources with it, but I fail to do so - I can't create any new items and...

Interface Builder: How to open a subview in its own window?

When designing/laying out a view in Interface Builder, sometimes it would be nice to be able to open that view in its own window, rather than along with all of its parents. Is there a way to do that? A good example is when you have a long view with controls and labels and text fields, lets call this mycontent view, and this mycontent v...

Creating a nib file for a Table View Controller

I was trying to follow the Table View Programming Guide for iPhone OS but was having trouble creating a new Table View Controller that loads its data from a nib file. Specifically, I was trying to follow the steps in this part: If you prefer to load the table view managed by a custom table-view controller from a nib file, you mu...

Best way to transfer data between two views managed by a UITabViewController

What's the best way to get a reference to other views using default controllers? My MainView.xib is a TabBarController, and I want to know the best way to call methods from one view on another, or change data properties. Any transfer of data will also necessitate that the tabs switch, but I haven't figured out how to programatically cont...

Cocoa touch - problem with button-viewController connection

Hello, I'm very new to cocoa touch and am stuck on a problem that doesn't seem to have a google solution. I have added a view to my application, and this view has a button on it. When the button is pressed I want the callback to perform an operation. My problem is that the callback isn't being called. I created the view in Interface...

Interface Builder and Xcode integration not working

After having installed the iPhone SDK 3.1.2, Interface Builder is not in sync with Xcode anymore. The light indicator at the bottom of the XIB window is grey. IB doesn't see any files from the Xcode project. Xcode is always open when I start IB. I tried rebooting. No luck. I tried removing the preferences files for Xcode/IB. No luc...

UIViewController subclass init not called when loading from nib

I tried overriding the default initWithNibName designated initializer of a UIViewController subclass like so: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { // Custom initialization } return self; } I have also included it...

UIButton, created by Interface Builder, is crashing.

I have narrowed down an ugly bug, but since it seems like something internal to the nib/Interface Builder, I'm at a loss of what to do next. I've got a UIView created in IB which functions as a custom dialog box. It shows a message and two buttons. (Proceed or Cancel.) Both buttons have a Background image set in Interface Builder. Some...

want to display multiple lines in custom cell label

I have a label in a custom cell with 3 labels in a table view. I am trying to display a text message "Updated status one of user" in one of the labels, but it displays only "Updated status" and truncates the rest of the message. What can I tweek to display the whole message in a line or spill it to a second line is necessary? Appreciate ...

How to only auto resize certain NSTableColumn?

I have a table with 3 columns (NSTableColumn) build with XCode IB. The last column is "Amount" and the column before it is "Description. When I resize the window, the table will be resize as well but the "Amount" is the column that gets span wider. How do I fixed the "Amount" column width and instead auto resize the "Description" colu...

Why won't my awakeFromNib fire?

I am starting to move more of my view hierarchy construction to IB. I have a nib file called "AlignmentViewController.xib" in which I set up my view hierarchy with AlignmentViewController as the files owner. This works fine. One of the methods I remain fuzzy on is awakeFromNib. In the follow code snippet of AlignmentViewController I a...

A good way to create a shortcut selection field for use in a Mac app?

I need to have a way for the user to input a shortcut key combination in my Preferences and I'm looking to do something that works similar to how the System Preferences keyboard shortcut panel works. I thought about subclassing an NSTextField and override keyDown: and keyUp: but it seems these overrides do nothing... any hints? Altern...

error: request for member 'bounds' in something not a structure or union

Hi all, I'm getting the above error when compiling an iPhone app using the core-plot framework. I have this view controller's view linked to a CPLayerHostingView in IB. Here's the sample code from the viewDidLoad() function. - (void)viewDidLoad { [super viewDidLoad]; graph = [[CPXYGraph alloc] initWithFrame: self.view.bound...

Interface Builder. How do I Replace Programatic ViewControllers with IB ViewControllers?

As I move more and more of my UI construction from XCode to IB there is one remaining hurdle I need to clear. Currently, I create my custom viewControllers in XCode with custom initializers. They typically have a bunch of ivars that are set during initialization via passed params. I would really like to move as much of this as I can to ...