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
23
votes
4 answers

Interface Builder could not open the document ".xib" because it does not exist

I am localizing an app, following the steps listed here. I have successfully achieved that with around 45 .xib's, while just 4 of them gives me this error: "Interface Builder could not open the document ".xib" because it does not exist." when I move…
MrSueko
  • 415
  • 2
  • 5
  • 10
23
votes
3 answers

One xib File with Multiple "File's Owner"s

I've got three different UITableViews, each in it's own view, accessed via tabs. All three tables would ideally share the same custom UITableViewCell class and .xib file. I started with one table, setting the class of the .xib to my custom class…
Matthew Frederick
  • 22,245
  • 10
  • 71
  • 97
23
votes
7 answers

IOS Static Framework with resources inside

I'm trying to create a framework that keeps some common code I use around in my projects. I found online tutorials and managed to create a framework but I still have one problem related to resources (xibs, images, etc). Let's say I have a…
Andrei Stanescu
  • 6,353
  • 4
  • 35
  • 64
22
votes
11 answers

Storyboard/XIB and localization best practice

The officially recommended method for XIB/Storyboard localization is to create .xib and .storyboard files inside xx.lproj (where xx is the two letter language ID) for each localization you want to support. This creates a problem because you have…
Morrowless
  • 6,856
  • 11
  • 51
  • 81
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
5 answers

How to get a black status bar on an iPhone app?

I want to use a black status bar for my iPhone app. I have selected black status bar on all of my .xibs but I still can't get it to be black. Is this an issue that anyone else has seen or knows how to remedy?
Jackelope11
  • 1,181
  • 4
  • 15
  • 31
21
votes
2 answers

Xcode 9.3. How to hide view statusbar in xib?

In Xcode < 9.3 we can hide status bar in view in xib by setting top bar simulated metrics to None. But now in 9.3, when setting this to None, the status bar didn't hide. Any ideas how to hide it?
Svetoslav
  • 568
  • 4
  • 9
21
votes
2 answers

What is safe area in xib in xcode 9?

Can you please let me know what is safe area (highlighted in image) in xibs in xcode 9. and what is use of this?
Jagdeep Singh
  • 2,556
  • 3
  • 18
  • 28
21
votes
4 answers

iOS Swift viewForHeaderInSection Not being Called

I have a UITableview I am trying to add a HeaderView onto my UITableview . However the viewForHeaderInSection is not being called, but I see the titleForHeaderInSection is being called or is shown. I also tried using a custom cell header for this…
user3110353
  • 512
  • 2
  • 7
  • 17
21
votes
4 answers

Can not create an iPhone xib file with Xcode 6

The checkbox to create a .xib file in Xcode 6 seems to be disabled. I can not find any way to enable it again. Does anybody know if this is possible?
csciXAV_12
  • 309
  • 1
  • 5
  • 13
20
votes
2 answers

Xcode: Run project with specified localization

My Cocoa project is localized in Italian (my language) and English language. If I run it, i see everything in Italian (of course, my OS is italian!). How can I run it to test the English localization without changing the OS language?
Oneiros
  • 4,328
  • 6
  • 40
  • 69
20
votes
3 answers

"Also create xib file" button disabled

I have this problem with creating UIView's subclasses. Creating, for example, UIViewControllers or UITableViewCells is okay. Why this happens? I create view using cmd+N and Xcode Version 7.3.1:
Zaporozhchenko Oleksandr
  • 4,660
  • 3
  • 26
  • 48
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
8 answers

iPhone app crashing with NSUnknownKeyException setValue:forUndefinedKey:

I'm writing my first iPhone app, so I haven't gotten around to figuring out much in the way of debugging. Essentially my app displays an image and when touched plays a short sound. When compiling and building the project in XCode, everything builds…
btw
  • 7,006
  • 9
  • 40
  • 40
19
votes
2 answers

Xcode adds a lot of tag in my storyboard and xib file

Just wanna know if anybody has the same issue as mine: Xcode adds a lot of tags into the storyboard I touch. I try to remove but I can't because it keep adding those tags back. It this a bug of the new Xcode I'm using (7.0.1)?
Sam Zhao
  • 209
  • 2
  • 6