Skip to main content

Questions tagged [interface-builder]

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

interface-builder
Filter by
Sorted by
Tagged with
1323 votes
82 answers
1.0m views

Xcode - How to fix 'NSUnknownKeyException', Reason: "… this class is not key value coding-compliant for the key X" error?

I'm trying to link a UILabel with an IBOutlet created in my class. My application is crashing with the following error" *** Terminating app due to uncaught exception 'NSUnknownKeyException', ...
819 votes
33 answers
298k views

Loaded nib but the 'view' outlet was not set

I added a new nib file to my project, and tried to load it. However, when I click on the toolbar icon that is supposed to take me to the view that I created, I get an NSInternalInconsistencyException ...
John's user avatar
  • 10.9k
640 votes
52 answers
235k views

Xcode 6 Bug: Unknown class in Interface Builder file

I upgraded to Xcode 6 beta 4 and now my App continuously crashes with the message Unknown class X in Interface Builder file. It crashes because supposedly Xcode can't find my custom classes that I ...
Epic Byte's user avatar
  • 33.9k
625 votes
35 answers
368k views

UIScrollView Scrollable Content Size Ambiguity

Fellow devs, I am having trouble with AutoLayout in Interface Builder (Xcode 5 / iOS 7). It's very basic and important so I think everyone should know how this properly works. If this is a bug in ...
Wirsing's user avatar
  • 6,773
574 votes
11 answers
132k views

Should IBOutlets be strong or weak under ARC?

I am developing exclusively for iOS 5 using ARC. Should IBOutlets to UIViews (and subclasses) be strong or weak? The following: @property (nonatomic, weak) IBOutlet UIButton *button; Would get rid ...
hypercrypt's user avatar
  • 15.4k
368 votes
24 answers
215k views

How to use Auto Layout to move other views when a view is hidden?

I have designed my custom Cell in IB, subclassed it and connected my outlets to my custom class. I have three subviews in cell content which are: UIView (cdView) and two labels (titleLabel and ...
Guferos's user avatar
  • 4,367
281 votes
19 answers
192k views

Could not insert new outlet connection: Could not find any information for the class named

I got an error on Xcode saying that there was no information about the view controller. Could not insert new outlet connection: Could not find any information for the class named Why is this ...
Ege Kaan Gürkan's user avatar
281 votes
14 answers
215k views

Cocoa Touch: How To Change UIView's Border Color And Thickness?

I saw in the inspector that I can change the background color, but I'd like to also change the border color and thickness, is this possible?
Shai UI's user avatar
  • 51.5k
261 votes
46 answers
175k views

"Unknown class <MyClass> in Interface Builder file" error at runtime

Even though Interface Builder is aware of a MyClass, I get an error when starting the application. This happens when MyClass is part of a library, and does not happen if I compile the class directly ...
245 votes
23 answers
309k views

How to load a UIView using a nib file created with Interface Builder

I'm trying to do something a bit elaborate, but something that should be possible. So here is a challenge for all you experts out there (this forum is a pack of a lot of you guys :) ). I'm creating a ...
user avatar
234 votes
23 answers
219k views

How to deselect a selected UITableView cell?

I am working on a project on which I have to preselect a particular cell. I can preselect a cell using -willDisplayCell, but I can't deselect it when the user clicks on any other cell. - (void)...
Ram's user avatar
  • 2,513
220 votes
5 answers
66k views

How do I enter RGB values into Interface Builder?

How can I enter RGB or Hex color values for backgrounds in Interface Builder? I can select predefined colors but I would like to manually enter in RGB values. Where can I do this?
Sheehan Alam's user avatar
  • 60.6k
212 votes
5 answers
61k views

Xcode 10, where are the UI elements?

Have been out of Swift coding for almost a year, I'm back. Download Xcode 10 beta. Have I lost my mind? I've tried every trick I know, none of the UI elements show up in storyboard. Zero. The ...
Edward Potter's user avatar
201 votes
9 answers
167k views

Is it possible to set UIView border properties from interface builder?

Is it possible to control UIView border properties (color, thickness, etc...) directly from interface builder or I can only do it programmatically?
matteo.cajani's user avatar
187 votes
15 answers
65k views

UISplitViewController in portrait on iPhone shows detail VC instead of master

I am using a Universal Storyboard in Xcode 6, targeting iOS 7 and above. I've implemented a UISplitViewController which is now natively supported on iPhone running iOS 8, and Xcode will automatically ...
Jordan H's user avatar
  • 54.5k
168 votes
11 answers
179k views

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: ...
suse's user avatar
  • 10.5k
165 votes
15 answers
69k views

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 ...
Dave's user avatar
  • 12.1k
161 votes
22 answers
84k views

@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 ...
Albert Bori's user avatar
  • 9,952
156 votes
8 answers
42k views

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. ...
János's user avatar
  • 34.5k
152 votes
15 answers
140k views

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 ...
Inder Kumar Rathore's user avatar
139 votes
9 answers
103k views

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) -...
Candyfloss's user avatar
  • 3,898
139 votes
6 answers
26k views

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 <document> tag's ...
JK Laiho's user avatar
  • 3,739
124 votes
2 answers
60k views

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 ...
Olof's user avatar
  • 5,338
116 votes
7 answers
109k views

How to add a button to UINavigationBar?

How to add a button to UINavigationBar programmatically?
RexOnRoids's user avatar
112 votes
14 answers
89k views

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 ...
terriblememory's user avatar
112 votes
2 answers
90k views

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? ...
RTB's user avatar
  • 5,813
107 votes
4 answers
99k views

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;...
wfbarksdale's user avatar
  • 7,566
104 votes
14 answers
17k views

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....
mnemia's user avatar
  • 1,549
100 votes
3 answers
30k views

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 ...
rsswtmr's user avatar
  • 1,816
96 votes
4 answers
51k views

"Width equals height" constraint in Interface Builder

I can't find a way to create a 'square' constraint, meaning 'width equals height' in Interface Builder. I guess it's possible to add such constraint programmatically. Is there something I can do in IB?...
DemoniacDeath's user avatar
96 votes
11 answers
48k views

IB_DESIGNABLE, IBInspectable -- Interface builder does not update

I have the following set of code: CustomView.h #import <UIKit/UIKit.h> IB_DESIGNABLE @interface CustomView : UIView @property (nonatomic) IBInspectable UIColor *borderColor; @property (...
nhgrif's user avatar
  • 61.8k
95 votes
18 answers
66k views

how do I use UIScrollView in Interface Builder?

While I've used UIScrollView successfully in the past by manipulating it programmatically, I'm having trouble getting it to work by setting it up exclusively in Interface Builder. I have a simple "...
George Armhold's user avatar
92 votes
9 answers
28k views

Xcode - Is there a way to drag a component from one view to another without losing its frame?

What I'd like to do is drag a component/view from one superview to another in Xcode's interface-builder without having its frame/position be reset. Xcode's default behavior when doing this appears ...
aroth's user avatar
  • 54.6k
91 votes
1 answer
33k views

What are File Owner and First Responder in iOS - Xcode?

What are File Owner and First Responder in iOS - Xcode?
Matrix's user avatar
  • 7,557
90 votes
16 answers
90k views

Loading a Reusable UITableViewCell from a Nib

I am able to design custom UITableViewCells and load them just fine using the technique described in the thread found at http://forums.macrumors.com/showthread.php?t=545061. However, using that ...
Greg Martin's user avatar
  • 5,064
90 votes
3 answers
26k views

iOS autolayout to center my view between two views

How to set up autolayout in Interface Builder to arrange views vertically as shown on image: Top view pinned to top screen edge, Bottom view pinned to bottom screen edge. My view should be centered ...
brigadir's user avatar
  • 6,932
90 votes
6 answers
34k views

How to create an IBInspectable of type enum

enum is not an Interface Builder defined runtime attribute. The following does not show in Interface Builder's Attributes Inspector: enum StatusShape:Int { case Rectangle = 0 case Triangle = ...
SwiftArchitect's user avatar
89 votes
8 answers
19k views

Could not instantiate class named IBNSLayoutConstraint

I'm using XCode6 beta and trying out Swift. When I put some auto layout constraints in a view controller the app crashes with the following error: Terminating app due to uncaught exception '...
zbrox's user avatar
  • 2,723
88 votes
10 answers
46k views

Can't resize UIView in IB

Probably something simple, but I can't figure why I cannot resize a UIView in a xib in Interface Builder. I created a new view XIB in xcode and in the size inspector, the width and height are ...
user avatar
86 votes
8 answers
63k views

UITextField "value changed" not firing when field is updated

I have an IBAction that I have connected to a UITextField element in Interface Builder. (Firing on "value changed" event) I also have a UISlider that updates the TextField element automatically when ...
Andrew Lauer Barinov's user avatar
86 votes
6 answers
70k views

How to send objects in NIB files to front/back?

How can I adjust the "z"-positions of objects (e.g. sending UIImageViews to the front/back) in the integrated interface builder in Xcode?
Joe's user avatar
  • 2,187
86 votes
12 answers
100k views

Alignment UIImageView with Aspect Fit

for my UIImageView I choose Aspect Fit (InterfaceBuilder) but how can I change the vertical alignment?
Maurice Raguse's user avatar
84 votes
2 answers
79k views

Programmatically send to front/back elements created from interface builder

In interface builder, there are layout options to send to back or send to front any elements such as UIButton, UIImage, UILabel etc... Now, I would like to do the same at runtime, programmatically. ...
Yohann T.'s user avatar
  • 1,915
83 votes
7 answers
37k views

Reuse a uiview xib in storyboard

I typically like to create and design my uiviews in interface builder. Sometimes I need to create a single view in a xib that can be reused in multiple view controllers in a storyboard.
Garfbargle's user avatar
  • 3,212
82 votes
2 answers
26k views

Remove Content and Frame layout guides from UIScrollview

I made a pod Xcode 11 and iOS 13, created an UIScrollview and set my content there. While installing on an older main project, this alert message shows: Content and frame layout guides before iOS ...
alxlives's user avatar
  • 5,192
82 votes
1 answer
1k views

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's user avatar
  • 1,079
80 votes
13 answers
34k views

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 ...
elbuild's user avatar
  • 4,889
77 votes
6 answers
19k views

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 ...
Nick's user avatar
  • 4,158
77 votes
8 answers
9k views

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 ...
Eddie's user avatar
  • 1,923
76 votes
10 answers
36k views

@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: ...
jbehrens94's user avatar
  • 2,396

1
2 3 4 5
125