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

How to replace RootViewController in "Navigation-based application"

I have an application that uses the "navigation-based application" template in XCode. Now I want to change it so that the first view that loads is a regular (custom) UIView, and if the user clicks a particular button, I push the original…
iter
  • 4,171
  • 8
  • 35
  • 59
15
votes
3 answers

Where to put .xib file inside framework project?

I lost half a day figuring this and I can't see a straight forward solution online. I created an iOS CocoaTouch Framework. I have some private and public classes in it and it all works fine. The problem is when I add .xib file inside that…
vale4674
  • 4,161
  • 13
  • 47
  • 72
15
votes
3 answers

'Could not load NIB in bundle' from iOS Static Framework

I am creating a static iOS framework (default template in Xcode 6) that includes xib files. However I am having trouble loading the nib files when adding my framework to another app, I'm getting the following error: Terminating app due to uncaught…
KDaker
  • 5,899
  • 5
  • 31
  • 44
15
votes
4 answers

UIButton inside UIView doesn't respond to touch events

I've put a UIButton inside a custom UIView and the button is not receiving any touch events (it doesn't get into the highlighted state, so my problem is not about being unable to wire up a touch inside up handler). I've tried both putting it into…
Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
15
votes
3 answers

Can I use two xibs with one viewcontroller - re: porting to iPhone 5

I just submitted my first app to the app store (yay it was just approved!). I now want to update it to work with (look nicer on) the larger iPhone 5 screen. I don't intend to change anything other than to change the layout a bit for the larger…
Dale Dietrich
  • 7,196
  • 4
  • 21
  • 25
15
votes
1 answer

Why doesn't initWithNibName work for my UIViewController subclass?

I have subclassed UIViewController into a new class, PageViewController (I'm writing a simple book app). I want to add a new view loaded from a nib file and am using the following code. It works. PageViewController *viewController1 =…
niels
  • 185
  • 1
  • 2
  • 9
14
votes
0 answers

custom inputAccessoryView as UIView from nib giving error: returned 0 width, assuming UIViewNoIntrinsicMetric

I am using an inputAccessoryView which is loaded from a nib using the following UIView subclass: class CustomInputAccessoryView: UIView { @IBOutlet var containerView: UIView! @IBOutlet var contentView: UIView! @IBOutlet weak var…
alionthego
  • 8,508
  • 9
  • 52
  • 125
14
votes
2 answers

How to set linear gradient to background of LaunchScreen.xib in iOS

Is there any way to set linear gradient to background of LaunchScreen.xib in iOS? Something like background="linear-gradient(#000000, #123456)"?
Vesmy
  • 1,190
  • 4
  • 15
  • 29
14
votes
1 answer

iOS 10 Launch Screen Bug

My Device and Simulator seem to be caching the launch screen for my app! I have deleted the original Launch Screen.storyboard and created my own XIB and swift files called "StartingPointView.xib" and "StartingPointView.Swift". The XIB file contains…
Reza
  • 301
  • 3
  • 8
14
votes
2 answers

How to connect delegate from custom class in xib?

I have created a class "DeletableImageView" (.swift + .xib) which uses the protocol I defined as "DeletableImageViewDelegate" through a property I called delegate. Example for sake of clarity: DeletableImageView.swift protocol…
Matthieu luci
  • 141
  • 1
  • 4
14
votes
1 answer

Dynamic Cell Size in Table View from a custom Xib

(Warning, I'm an iOS newbie.) I have created a custom Table View Cell and have registered it, and implemented it, on two seperate Table View Controllers. When I run the app the custom xib content is truncated by the parent Table Cell View height.…
Sean
  • 2,412
  • 3
  • 25
  • 31
14
votes
3 answers

Can I Animate an image iOS8 LaunchScreen.xib

Question: Are there ways to animate anything within the LaunchScreen.xib file of an Xcode 6 Project targeted to deploy for iOS 8.1+ ? Context: I'm looking to make simple animations to convey activity or serve as a distraction to the user while they…
Jono Tho'ra
  • 1,476
  • 3
  • 18
  • 28
14
votes
5 answers

UIView in XIB using Autolayout is always 600x600

I created a separate .xib because I wanted to design a UIView with autolayout outside of a viewController. I created the .xib, added the UIView and the constraints, using wCompact hRegular. Simple. Then add it to my viewController in…
Nic Hubbard
  • 41,587
  • 63
  • 251
  • 412
14
votes
6 answers

Good reasons why to not use XIB files?

Are there any good reasons why I should not use XIB / NIB files with an highly customized UI and extensive animations and super low memory footprint needs? As a beginner I started with XIB. Then I figured out I couldn't do just about everything in…
dontWatchMyProfile
  • 45,440
  • 50
  • 177
  • 260
14
votes
3 answers

Swift proper way to load xib file

I have some strange problem with loading xib file in swift project. It's so frustrating because I already know how to do it in Obj-C. But since swift is swift so you can't do it like you did.. :/ So I have create IconTextFiled.xib and…
Błażej
  • 3,617
  • 7
  • 35
  • 62