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:

3016 questions
816
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,839
  • 8
  • 26
  • 31
301
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,321
  • 3
  • 20
  • 14
261
votes
15 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
  • 62,602
  • 20
  • 102
  • 156
192
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,705
  • 3
  • 17
  • 28
184
votes
30 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
  • 12,675
  • 21
  • 96
  • 179
167
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,715
  • 7
  • 27
  • 42
158
votes
11 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
  • 11,127
  • 7
  • 49
  • 77
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,020
  • 3
  • 15
  • 20
139
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,538
  • 6
  • 35
  • 42
113
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,920
  • 6
  • 23
  • 33
101
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,175
  • 22
  • 126
  • 148
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
  • 44,613
  • 41
  • 116
  • 144
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,222
  • 2
  • 17
  • 17
78
votes
28 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,187
  • 1
  • 21
  • 44
78
votes
2 answers

How to set Hex color code in xib in iOS

I am not finding an option for Hex color code in xib color picker in xcode. But I have seen in stack over flow answer, https://stackoverflow.com/a/27283783/4391112. In this, image is having Hex color code option in color picker. Xcode version :…
iOS
  • 811
  • 1
  • 6
  • 8
1
2 3
99 100