Questions tagged [xib]

XIB is the file format for Interface Builder, which is a development tool for the Mac OS X & iOS platforms.

is a software development application for Apple's Mac operating system. It is part of (formerly Project Builder), the Apple Developer Connection developer's toolset. Interface Builder allows and Carbon developers to create interfaces for applications using a graphical user interface. The resulting interface is stored as a .nib file, short for NeXT Interface Builder, or more recently, as a .xib () file.

Interface Builder is descended from the NeXTSTEP development software of the same name. A version of Interface Builder is also used in the development of OpenStep software, and a very similar tool called Gorm exists for GNUstep. On March 27, 2008, a specialized iPhone version of Interface Builder allowing interface construction for iPhone applications was released with the iPhone SDK Beta 2. As of Xcode 4, Interface Builder no longer exists as a separate application, and its functionality is directly integrated into Xcode.

The Interface Builder editor within Xcode makes it simple to design a full user interface without writing any code. Simply drag and drop windows, buttons, text fields, and other objects onto the design canvas to create a functioning Mac, iPhone, or iPad user interface.

Because Cocoa and Cocoa Touch are built using the Model-View-Controller pattern, it is easy to independently design your interfaces, separate from their implementations. User interfaces are actually archived Cocoa or Cocoa Touch objects (saved as .nib files), and OS X and iOS will dynamically create the connection between UI and code when the app is run.

Resources:

2952 questions
772
votes
32 answers

Loaded nib but the 'view' outlet was not set

I added a new nib file to my project, and tried to load it. However, when I click on the toolbar icon that is supposed to take me to the view that I created, I get an NSInternalInconsistencyException with the message: Terminating app due to…
John
  • 10,219
  • 7
  • 24
  • 30
297
votes
23 answers

How do you load custom UITableViewCells from Xib files?

The question is simple: How do you load custom UITableViewCell from Xib files? Doing so allows you to use Interface Builder to design your cells. The answer apparently is not simple due to memory managment issues. This thread mentions the issue and…
DrGary
  • 3,281
  • 3
  • 18
  • 14
250
votes
12 answers

How to Empty Caches and Clean All Targets Xcode 4 and later

Jonathan suggest here: Xcode Includes .xib files that have been deleted! that cleaning all targets and empty the caches will fix the problem with Xcode including deleted .xib files but I cannot find a way to empty the cache in Xcode 4. How to do…
Tieme
  • 53,990
  • 18
  • 90
  • 147
187
votes
8 answers

How can I load storyboard programmatically from class?

My problem is that I was looking for way to use both storyboard and xib. But I can't find proper way to load and show storyboard programmatically. Project was started developing with xib, and now it's very hard to nest all xib files in storyboard.…
kokoko
  • 2,614
  • 3
  • 15
  • 25
162
votes
27 answers

Load a UIView from nib in Swift

Here is my Objective-C code which I'm using to load a nib for my customised UIView: -(id)init{ NSArray *subviewArray = [[NSBundle mainBundle] loadNibNamed:@"myXib" owner:self options:nil]; return [subviewArray objectAtIndex:0]; } What is…
Bagusflyer
  • 11,547
  • 16
  • 84
  • 167
161
votes
6 answers

What is the difference between a .xib file and a .storyboard?

Can someone explain in simple words the difference between .xib and .storyboard?
gsach
  • 5,585
  • 6
  • 23
  • 42
158
votes
9 answers

Could not insert new outlet connection

Could not insert new outlet connection: Could not find any information for the class and not showing any class named "ViewController" Solutions I have done : - Restarted XCode - Restarted System - Deleted the Deriveddata contents from…
Noufal Kmc
  • 2,010
  • 3
  • 13
  • 20
142
votes
10 answers

Load view from an external xib file in storyboard

I want to use a view throughout multiple viewcontrollers in a storyboard. Thus, I thought about designing the view in an external xib so changes are reflected in every viewcontroller. But how can one load a view from a external xib in a storyboard…
Sebastian Hoffmann
  • 10,024
  • 5
  • 43
  • 74
134
votes
6 answers

Xcode changes unmodified storyboard and XIB files

Storyboards are rather a royal pain from a git workflow perspective when multiple people are collaborating on them. For example, the XML in the .storyboard file has its starting tag's toolsVersion and systemVersion attributes altered by…
JK Laiho
  • 3,252
  • 5
  • 30
  • 36
112
votes
7 answers

How to load a xib file in a UIView

I have been searching everywhere and nothing so far has worked for me. Basically I want to have a .xib file called rootView.xib and inside it I want to have a UIView (lets call it containerView) that takes up only half of the screen (so there would…
Matt
  • 2,910
  • 6
  • 20
  • 31
98
votes
6 answers

Correct way to load a Nib for a UIView subclass

I am aware this question has been asked before but the answers are contradicting and I am confused, so please don't flame me. I want to have a reusable UIView subclass throughout my app. I want to describe the interface using a nib file. Now let's…
Adam Waite
  • 19,748
  • 19
  • 120
  • 146
96
votes
3 answers

Custom views with Storyboard

In complex screens (View Controllers) I used to separate the whole thing in smaller pieces (I call them widgets). These widgets consist basically of a MyWidget.h and a MyWidget.m file as well as a MyWidget.xib file, where the root element is a…
znq
  • 42,465
  • 38
  • 114
  • 143
83
votes
7 answers

Reuse a uiview xib in storyboard

I typically like to create and design my uiviews in interface builder. Sometimes I need to create a single view in a xib that can be reused in multiple view controllers in a storyboard.
Garfbargle
  • 3,192
  • 2
  • 14
  • 17
75
votes
17 answers

Converting iPhone xib to iPad xib?

How do you do it? I saw one video tutorial on it, but the screen was too small. Also, other than changing the view size, are there any other major changes I would have to make to my iphone apps to convert to iPad?
NextRev
  • 1,671
  • 4
  • 22
  • 31
74
votes
24 answers

IOS project showing error "An internal error occurred. Editing functionality may be limited" on xcode 7.1

I just created one new cordova ios project via CLI, and i opened that project in Xcode 7.1 and while running on simulator am getting some error on mainViewController.xib, if we clicked on that error its showing xib file and on top of that showing…
Arjun T Raj
  • 3,117
  • 1
  • 17
  • 39
1
2 3
99 100