nib

iPhone - How should I write an init method ?

How should I write an init method for a class which is sub-classing an NSObject Let's say i have a class named : CustomButton subclassing UIButton I have an empty nib file named CustomButton.nib which has a single UIButton in it. IN interface builder the classname for the button is set to "CustomButton" How would you write an init me...

How do I get a view in Interface Builder to load a custom view in another nib?

I am making a custom widget that I would like to use in multiple nibs. So I make a new view nib Screen3, add some buttons, and now want my UIAwesomeSauce widget. If I just add a view and then change the Class Identity, it doesn't get the subelements from the UIAwesomeSauce nib. Same thing if I go to the Library and switch to Classes...

-initWithFrame method is being called twice

Hi, I have written a code to load a nib file which consists of a view and a tableview. Everything works fine as expected but when i run the program, sometimes the views gets loaded, sometimes it doesnot. I mean, when i run my application say for the first time, it will open a proper GUI window with all the views in place. when i re-open ...

Binding to array controller in another nib for inspector window

Binding a popup menu to an array controller with the path selection.type works fine. Binding a popup menu to a document controller with the path currentDocument.arrayController.selection.type works one way only (changes in selection are not propagated to the popup menu). How can one achieve inspector-window-like functionality by bindi...

Setting shadow color for the title of UIButton in the nib

Hi, I am developing a simple iPhone application. I want to set the shadow color for the title of a UIButton in the nib. Can someone help me in finding the set shadow color for the title in the nib? Thanks and Regards, Deepa ...

readFromData:ofType:error: called before loading nib so I can't use my IBOutlets D:<

I have an application that uses NSDocument to open files. I have an NSView in my NIB, and I'd like to set it's size according to the image opened: - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError { NSLog("FOO"); // Load image // ... // Change size [mainView setFrameSize:NSMakeRect(ima...