Questions tagged [interface-builder]

Interface Builder is a visual design tool used to create user interfaces for Apple's macOS and iOS platforms.

is a visual design tool used to create user interfaces for Apple's and platforms. It is part of , Apple's . allows , and developers to visually compose interfaces for applications. The resultant interface is stored as a file (short for XML Interface Builder) and is compiled to a file at build time (short for NeXT ).

6236 questions
80
votes
13 answers

iOS equivalent for Android View.GONE visibility mode

I'm developing an app for iOS and I'm using the Storyboard with AutoLayout ON. One of my view controllers has a set of 4 buttons, and in certain circumstances i would like to make the first one disappear. If I use the setHidden:TRUE method the…
elbuild
  • 4,869
  • 4
  • 24
  • 31
77
votes
8 answers

Xcode 11 add new constraints set zero: use set value instead of default / standard

I used to use autolayout add new constraints to make simple constraints to superview / relative view like this (for loooong time): However, recently after updated to the latest xcode (11.3.3 or just 11.3/11C29), I have this weird issue: when I set…
Eddie
  • 1,903
  • 2
  • 21
  • 46
76
votes
10 answers

@IBDesignable crashing agent

When I write my own UIButton-extended class and make it @IBDesignable, I receive two errors in Interface Builder, namely: Main.storyboard: error: IB Designables: Failed to update auto layout status: The agent crashed because the fd…
jbehrens94
  • 2,356
  • 6
  • 31
  • 59
76
votes
6 answers

Color in storyboard not matching UIColor

I am defining a color in code as [UIColor colorWithHue:32.0/360.0 saturation:0.88 brightness:0.97 alpha:1] If I try to set the same color in storyboard, when running the App it is a slightly different colour to the one defined in code. If I drag…
Nick
  • 3,958
  • 4
  • 32
  • 47
74
votes
12 answers

What are the benefits of using Storyboards instead of xib files in iOS programming?

What are the main differences between using Storyboards and xib files. Specifically, what are the advantages or disadvantages of using a Storyboard? Unfortunately, despite doing quite a bit of research, all I've been able to find on Storyboards are…
Steve
  • 743
  • 1
  • 5
  • 5
74
votes
4 answers

Add spacing constraint to superview in Xcode 5

I am building an iOS app in Xcode 5, and I'm having trouble adding layout constraints. In Xcode 4.x, I could just add leading/trailing/top/bottom spaces to container (superview) to any UI element. Now, I only have this option: I want to add a…
Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
73
votes
17 answers

Interface Builder - Failed to load designables from path (null)

I have some custom controls I have created and I'm them using in a new project. However, I keep getting errors in interface builder: Failed to update auto layout status: Failed to load designables from path (null) or Failed to render instance of…
Jake
  • 13,097
  • 9
  • 44
  • 73
73
votes
3 answers

Interface Builder degrades storyboards, resizes and repositions views in small increments

We have a number of iOS apps that several different developers contribute to. A problem that I continue to notice is that views in our storyboards will shift out of the position they were put in or resize so that they are smaller, which on labels…
Jeff Lockhart
  • 5,379
  • 4
  • 36
  • 51
72
votes
1 answer

Was the origin positioning 'box' removed from Xcode 6?

I don't see this tool in Xcode 6. Did they take it out? Can I re-enable it? I use it all the time.
dMurdZ
  • 979
  • 7
  • 18
71
votes
17 answers

UIView backgroundColor disappears when UITableViewCell is selected

I have a simple tableViewCell build in interface builder. It contains a UIView which contains an image. Now, when I select the cell, the default blue selection background is shown, but the backgroundColor of my UIView is gone. My UITableViewCell's…
Tycho Pandelaar
  • 7,367
  • 8
  • 44
  • 70
71
votes
5 answers

Can I use setFrame and autolayout on the same view?

I want to add padding to all of my buttons, so I subclassed UIButton, and among other changes, I wanted to add a fixed padding by using setFrame method. Everything was working, except for setFrame. I checked around, and I found out that if I…
SirRupertIII
  • 12,324
  • 20
  • 72
  • 121
70
votes
14 answers

Change character spacing on UILabel within Interface Builder

Is there anyway to change the character spacing (track) on UILabel text using Interface Builder? If not, is there a way to do it programmatically on an existing UILabel that was already created with attributed text?
codeman
  • 8,868
  • 13
  • 50
  • 79
69
votes
8 answers

Is there a way for Interface Builder to render IBDesignable views which don't override drawRect:

I very rarely override drawRect in my UIView subclasses, usually preferring to set layer.contents with pre-rendering images and often employing multiple sublayers or subviews and manipulating these based on input parameters. Is there a way for IB to…
Hari Honor
  • 8,677
  • 8
  • 51
  • 54
68
votes
5 answers

What is the difference between NIB and XIB Interface Builder file formats?

What is difference between nib and xib in Interface Builder files?
Ratan
  • 1,747
  • 2
  • 18
  • 27
68
votes
5 answers

How to set default values for IBInspectable in Objective-C?

I know default values of IBInspectable-properties can be set as: @IBInspectable var propertyName:propertyType = defaultValue in Swift. But how do I achieve a similar effect in Objective-C so that I can have default value of some property set to…
Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389