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
167
votes
11 answers

IBOutlet and IBAction

What is the purpose of using IBOutlets and IBActions in Xcode and Interface Builder? Does it make any difference if I don't use IBOutlets and IBActions? Swift: @IBOutlet weak var textField: UITextField! @IBAction func buttonPressed(_ sender: Any)…
suse
  • 10,503
  • 23
  • 79
  • 113
164
votes
14 answers

Xcode 9 - "Fixed Width Constraints May Cause Clipping" and Other Localization Warnings

I downloaded the new Xcode and in Interface Builder I'm having a ton of problems with warnings that say things like: Fixed Width Constraints May Cause Clipping It looks like this: I do have localization for several languages and I understand the…
Dave G
  • 12,042
  • 7
  • 57
  • 83
161
votes
22 answers

@IBDesignable error: IB Designables: Failed to update auto layout status: Interface Builder Cocoa Touch Tool crashed

I have a very simple subclass of UITextView that adds the "Placeholder" functionality that you can find native to the Text Field object. Here is my code for the subclass: import UIKit import Foundation @IBDesignable class PlaceholderTextView:…
Albert Bori
  • 9,832
  • 10
  • 51
  • 78
156
votes
8 answers

Why is UICollectionViewCell's outlet nil?

I have created a custom UICollectionViewCell in Interface Builder, binded views on it to the class, and then when I want to use and set a string to the label on the string, tha label has a nil value. override func viewDidLoad() { …
János
  • 32,867
  • 38
  • 193
  • 353
149
votes
15 answers

How to make UIButton's text alignment center? Using IB

I can't set the title of UIButton using IB as center. My title is multi line.It is giving like this one But I want like this one I have given space in this but I don't want to do that. As it is not aligned exactly for some cases and I know there…
Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184
139
votes
9 answers

Xcode 6 Storyboard the wrong size?

Built a new project from scratch in Swift in Xcode 6 (Beta 1) and have seen some strange behaviour with Storyboards and the output that I am viewing. I have built a simple interface (as shown below) - with properties of View Controller…
Candyfloss
  • 3,848
  • 4
  • 31
  • 32
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
124
votes
2 answers

Remove autolayout (constraints) in Interface Builder

I'm trying to make my project compatible with Snow Leopard and I am not able to remove the autolayout in the nibs using Interface builder (XCode 4.3 on Lion). Is it possible to remove the constraints and the autolayout in a nib on XCode?
Olof
  • 5,348
  • 4
  • 25
  • 27
116
votes
7 answers

How to add a button to UINavigationBar?

How to add a button to UINavigationBar programmatically?
RexOnRoids
  • 14,002
  • 33
  • 96
  • 136
112
votes
2 answers

What is a StoryBoard ID and how can I use this?

I am new to IOS developing and recently started in Xcode 4.5. I saw for every viewController that i could set some identity variables including the storyboard ID. What is this, and how can I use it? I started searching on stackoverflow and couldn't…
RTB
  • 5,773
  • 7
  • 33
  • 50
110
votes
14 answers

Can I disable autolayout for a specific subview at runtime?

I have a view that needs to have its frame manipulated programmatically - it's a kind of document view that wraps to its content which is then scrolled and zoomed around a superview by manipulating the frame origin. Autolayout fights with this at…
terriblememory
  • 1,712
  • 3
  • 18
  • 25
106
votes
4 answers

Handling Touch Event in UILabel and hooking it up to an IBAction

Ok, so I have a UILabel created in interface builder that displays some some default text of "tap to begin". When the user taps the UILabel I want it to trigger an IBAction method: -(IBAction)next; which updates the text on the label to say…
wfbarksdale
  • 7,498
  • 15
  • 65
  • 88
104
votes
14 answers

Custom Font Sizing in Xcode 6 Size Classes not working properly with Custom Fonts

Xcode 6 has a new feature where fonts and font sizes in UILabel, UITextField, and UIButton can be set automatically based on the size class of the current device configuration, right in the storyboard. For example, you can set a UILabel to use font…
mnemia
  • 1,549
  • 2
  • 12
  • 14
100
votes
3 answers

Does anyone know what the new Exit icon is used for when editing storyboards using Xcode 4.5?

Right-clicking the Exit icon yields an empty window. Can't Ctrl-drag a connection to any IB elements or corresponding source files. Docs give no love. Doesn't appear in nib files, only storyboards. My assumption is that it's a corollary to segues,…
rsswtmr
  • 1,776
  • 5
  • 16
  • 26
96
votes
11 answers

IB_DESIGNABLE, IBInspectable -- Interface builder does not update

I have the following set of code: CustomView.h #import IB_DESIGNABLE @interface CustomView : UIView @property (nonatomic) IBInspectable UIColor *borderColor; @property (nonatomic) IBInspectable CGFloat borderWidth; @property…
nhgrif
  • 61,578
  • 25
  • 134
  • 173