Questions tagged [nib]

NIB files are similar to XIB files (XCode Interface Builder), with the difference being XIB files are modified during development and NIB files are created during the build process. NIBs store static information about the interface as well as any behavior that has been implemented.

Storyboards have since succeeded NIB/XIB files as the latest UI interface tool.

1152 questions
7
votes
1 answer

Releasing IBOutlets in UIViewController’s viewDidUnload?

I’m a bit confused as to what happens exactly in Nib-based UIViewControllers. When generating a UIViewController subclass, the template contains a very specific comment in the viewDidUnload method: // Release any retained subviews of the main…
Raphael Schweikert
  • 18,244
  • 6
  • 55
  • 75
7
votes
1 answer

How do I get the nib Name of a UIViewControl object from the storyboard

I am trying to define a variable in a property within a UIViewControl class. The variable is a reference for another UIViewControl class called ViewControl. var handle = ViewControl(nibName: "insert_viewcontroller_id_here", bundle: nil") How do I…
Alexander Soare
  • 2,825
  • 3
  • 25
  • 53
7
votes
5 answers

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

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 its Name in Interface Builder. Is this possible? Is there a…
JJ Rohrer
  • 2,671
  • 5
  • 29
  • 37
7
votes
2 answers

Load custom UIView with XIB from a View Controller's view using IB

I have a custom UIView (MyCustomUIView) which is built using Interface Builder. I'd like to place this custom view in MyViewController's view, which is also designed using IB. I've placed an UIView as a subview in MyViewController's XIB and set it's…
Daniel
  • 73
  • 1
  • 1
  • 6
7
votes
2 answers

Failed to locate nib in stylus file

I am trying to use Nib CSS3 extensions in stylus. Installed stylus and nib (tried local & global -g). But none works, when I do stylus styles.styl > build/styles.css # styles.styl @import "nib" I get /usr/lib/node_modules/stylus/bin/stylus:502 …
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
7
votes
3 answers

Where to build views programmatically vs using a nib

I have searched around a lot, and dug through a couple of text books, but what I would really appreciate is a simple explanation of best practice to define UIView subclasses in an iOS app. If using a xib, where can I add/tweak the controls at the…
Ben Packard
  • 26,102
  • 25
  • 102
  • 183
6
votes
1 answer

NIB files and Version Control: Using branches

Is there a good way to use NIB (or XIB) files when working with branches? When I try to do this, most of the time the merging of topic branches does not really work. Autogenerated IDs change very frequently and all over the place, which provokes…
febeling
  • 1,390
  • 1
  • 12
  • 29
6
votes
3 answers

Which "Top-Level Objects" is Apple talking about in the Memory Management Programming Guide?

In the Memory Management Programming Guide for Cocoa Apple talks about Top-Level Objects. They say, that I need an Outlet for each of them. If there are any top-level objects you do not store in outlets, however, you must retain either the…
Thanks
  • 40,109
  • 71
  • 208
  • 322
6
votes
1 answer

Cocoa : How to use NSNib several times independently

I've asked how I can make a custom view repeat itself into several separate copies and have been told that I should use NSNib or NSViewController. I have a custom view in an nib file, whenever a user clicks a button, I want a new copy of the nib…
Elbimio
  • 1,041
  • 2
  • 10
  • 25
6
votes
2 answers

new xib in xcode4

I develped an iPhone app. Now i would like to do it in iPad. To do this I have to create the new .XIB files and linked to his Class. I don't know how to create a new .xib in xcode4. Could somebody help me? Now, to solve this problem, I create a new…
ValentiGoClimb
  • 750
  • 3
  • 13
  • 23
6
votes
2 answers

Forcing Xcode 4 to compile XIB into NIB

I upgraded an Xcode 3 project having three targets to Xcode 4. My targets' bundles no longer have any NIB files -- only XIB files. A new Xcode 4 project has both (at least in the simulator). I don't see any difference between the old and the new…
Jeff
  • 2,659
  • 1
  • 22
  • 41
6
votes
1 answer

Instantiating a UIView Subclass with a delegate, using a NIB file

I have a UIView subclass that I'd like to instantiate from a NIB file. I've been using this method to do it: UINib *nib = [UINib nibWithNibName:@"SSNodeToolsView" bundle:[NSBundle mainBundle]]; self = [[[nib instantiateWithOwner:self options:nil]…
Ash
  • 9,064
  • 3
  • 48
  • 59
6
votes
2 answers

svn conflict xcode project file while working in team

I'm working in a team that's developing iPhone application (about 7 people). We use SVN for source code control of iPhone code, we keep running into conflict issues with xcode project file and iPhone nib file. I think there has been a question asked…
phamductri
  • 1,351
  • 2
  • 14
  • 18
6
votes
2 answers

Storyboards vs Xib files

I read some answers related to the same question, but I'd like to ask for something specific. When you have a HUGE project, imagine a big social network, even if you separate your UIViewControllers logically into separate UIStoryBoards, it still…
Dani
  • 3,427
  • 3
  • 28
  • 54
6
votes
1 answer

Iphone Orientation and 2 Nib Files

I am trying to make an app where each view controller (.h/.m) has 2 NIB files... one for portrait, one for landscape. Is this the "standard" way of supporting orientation or must I manually set up the orientation view programmatically? The problem I…
Exegesis
  • 1,028
  • 1
  • 18
  • 47