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
29
votes
14 answers

Loading a XIB file to a UIView Swift

I am trying to load my XIB file into a UIView but I am having some trouble. I have the required override functions but they seem to be crashing. Saying this error, warning: could not load any Objective-C class information. This will …
Jimmy lemieux
  • 439
  • 1
  • 5
  • 14
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
28
votes
3 answers

Unsupported Configuration: This file is set to build for a version older than the deployment target. Functionality may be limited

Can anyone explain this warning? Unsupported Configuration: This file is set to build for a version older than the deployment target. Functionality may be limited. When my app was initially written a storyboard I tried was not supported. This…
Greg
  • 1,750
  • 2
  • 29
  • 56
27
votes
2 answers

Autolayout aspect ratio for UIImageView / UIView

How to set autolayout for UIImageView /UIView so that the image view width and height increases a bit for iphone 6 and 6 plus. I have tried adding the constraint Aspect ratio but the increased height and width are very big. Is there anyway to set…
abdul sathar
  • 2,395
  • 2
  • 28
  • 38
26
votes
2 answers

Hide home indicator in xib file

I'm creating a new View and decided to use a xib file so that I can design it in Interface Builder. I set the Size to Freeform, and resized it in the Size inspector. However no matter what size I make the view, it still shows the home button…
Senseful
  • 86,719
  • 67
  • 308
  • 465
26
votes
4 answers

Instantiate view from nib throws error

I tried to make @IBDesignable UIView subclass following this (link) tutorial. First custom view goes fine. But when I try to make another one, I have errors. First I got failed to update auto layout status: the agent crashed and Failed to render…
Lachtan
  • 4,803
  • 6
  • 28
  • 34
26
votes
2 answers

Move all subviews to container view keeping positions and constraints

I'm using Xcode 5 and autolayout in my project. I have a .xib file with a lot of subviews and constraints between them. Now I need to create an intermediate fullscreen container view and put all subviews there. So now I have view->subviews, and I…
Anastasia
  • 3,024
  • 1
  • 23
  • 34
25
votes
7 answers

Can't add constraints in xib

I have a xib but I can't add constraints. When I control click and drag I can't do anything also the buttons at the bottom I can't do anything with it. I'm using xCode 11.
user1007522
  • 7,858
  • 17
  • 69
  • 113
25
votes
3 answers

Could not load IBDesignable xib in the Interface Builder

I have a xib (childXib) file linked to its custom UIView swift file through its Owner. This is how I initialize my custom UIView: // init for IBDesignable override init(frame: CGRect) { super.init(frame: frame) let view = loadViewFromNib() …
Nico
  • 6,269
  • 9
  • 45
  • 85
25
votes
2 answers

Loading UIViewController "from" Nib File

I am trying to create an UIViewController from a Nib file. On Google I found that I can only load an UIView from Nib. But some suggests that I could create a Nib file (of UIView) whose File Owner is set to our ViewController. That is what I did, I…
JayVDiyk
  • 4,277
  • 22
  • 70
  • 135
25
votes
10 answers

Autolayout adding extra padding on top and bottom of UILabel iPhone 6/6+ when preferredMaxLayoutWidth is set

I created a sample project to reproduce this. I've a xib file with an UILabel having a fixed top, leading and trailing constraint. I added a minHeight constraint and set the number of lines to 0. I set the preferredMaxLayoutWidth to Automatic…
newDeveloper
  • 1,365
  • 1
  • 17
  • 27
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
24
votes
2 answers

Add a ContainerView inside a UIViewController created from .xib

I have a .xib file and i want to add it a container view (to place inside a ViewController). Unfortunately a container view is only disposable by storyboard. But when i create a .xib file and i search for the container view controller, i don´t found…
Fahem Issameddine
  • 293
  • 1
  • 2
  • 10
24
votes
2 answers

Can't Load UIViewController XIB file in Storyboard in Swift

I've read Using XCode storyboard to instantiate view controller that uses XIB for its design but I'm having troubles making this work in Swift (Using Xcode 6 Beta 6). I'm wondering if I've done something wrong or if this functionality isn't…
jer-k
  • 1,413
  • 2
  • 12
  • 23
24
votes
3 answers

Changing textField border color iOS

I want to change UITextField border color. Is it possible to customize the color of border? I searched all options in xib but I did not found any option to change border color.
user2017285
  • 283
  • 1
  • 2
  • 10