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
32
votes
3 answers

Checking if a .nib or .xib file exists

What's the best way to check if a Nib or Xib file exists before trying to load it using initWithNibName:bundle: or similar?
Richard Stelling
  • 25,607
  • 27
  • 108
  • 188
31
votes
4 answers

"First Responder" - Did I get that right?

Let me summarize this shortly: A "First Responder" in a nib file is an object, which represents the UI control element that has the user's focus. So if the user clicks on a control, the nib sets that clicked UI control as First Responder. In my app…
Thanks
  • 40,109
  • 71
  • 208
  • 322
29
votes
1 answer

Designing UICollectionView cells in nib with Interface Builder (without storyboard)

I am trying to design a custom UICollectionViewCell prototype (in Xcode 5.0.2), however Interface Builder doesn't let me add a cell to my UICollectionView while designing a nib. I can set the number of items (cells) and Interface Builder creates and…
28
votes
1 answer

Using XCode storyboard to instantiate view controller that uses XIB for its design

I have a UIViewController subclass that I created previously that had its controls laid out in a XIB file. I'd like to use this view controller in a storyboard now, but it seems although I can indicate a view controller's classname in the…
user1175914
  • 839
  • 3
  • 9
  • 8
27
votes
1 answer

Create a UIView from NIB

I have created a custom class that subclasses UIView. I want to do my layout in IB, so have set outlets. The problem is how do I initialise my view so that I get it from the NIB? Any help would be greatly appreciated.
John S
  • 1,687
  • 6
  • 21
  • 28
25
votes
2 answers

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…
CBGraham
  • 1,368
  • 1
  • 13
  • 14
25
votes
2 answers

NSViewController and multiple subviews from a Nib

I'm having a difficult time wrapping my head around loading views with Interface Builder and NSViewController. My goal is to have a view which meets the following description: Top bar at the top (like a toolbar but not exactly) which spans the…
jbrennan
  • 11,943
  • 14
  • 73
  • 115
25
votes
1 answer

What is difference between XIB and NIB?

Possible Duplicate: What's up with the .NIB -> .XIB? I want to know what is difference between xib and nib,I know some thing like xib = xml interface builder and nib is next interface builder,but I am not clear with difference between both…
Vishwa816
  • 321
  • 1
  • 4
  • 7
22
votes
3 answers

Curious Warning Message on UITextView

Has anyone run across this warning message building for the iPhone? More importantly do you understand how to fix it? "unsupported configuration data detection and editable" It's seems to be the UITextView that is complaining. Here's a screenshot.
aaronium112
  • 2,992
  • 4
  • 35
  • 50
22
votes
6 answers

Loaded nib but the view outlet was not set - Swift edition

I have a project that is all in Objective C, except for my view controller, which is in Swift. When I run it, i get the error Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController …
cowlinator
  • 7,195
  • 6
  • 41
  • 61
21
votes
1 answer

What do "Use standard value” and “Constrain to Margins" mean in Auto Layout?

I have gone through a couple of Auto Layout tutorials such as this. However I am still not clear on what the following options do in the pin dialog What are the differences between standard value, manual values, and canvas values? What does the…
James Franco
  • 4,516
  • 10
  • 38
  • 80
20
votes
3 answers

Load Nib for UIView used in ViewController in StoryBoard

I have a UIView that I want to use in several View Controllers so I created the view (.h/.m) and a nib file for it. In Storyboard view is added as subview to view controller but is not loading the layout as defined in nib. Is it possible to load…
tiltem
  • 4,952
  • 3
  • 23
  • 26
20
votes
3 answers

Resetting Storyboard on Logout

I am building an IOS 5.1 web client app that uses a storyboard. One of my actions is "logout", during which I want to reset my root view to the initial view created by the root view of the Storyboard. (When you log in, some view items are removed or…
Jason
  • 861
  • 9
  • 17
19
votes
7 answers

NSInternalInconsistencyException Could not load nib in bundle

I've created an application for child game. It loads 12 different questions for each round. After the 4th round the app crashes with the following log: ImageIO: CGImageRead_mapData 'open' failed…
Crazy Developer
  • 3,464
  • 3
  • 28
  • 62
19
votes
2 answers

initWithNibName VS NSBundle's loadNibNamed

I've noticed that there are two different ways to load nib/xib files: via the UIView's initWithNibName:bundle: method NSBundle's loadNibNamed:owner:options: method. Can someone explain the differences between these two and when it is more…
tbehunin
  • 1,043
  • 1
  • 12
  • 24
1
2
3
76 77