IBDesignable is a designation given to views in Xcode 6 that allows them to be rendered directly in Interface Builder without the need to build and run the application.
Questions tagged [ibdesignable]
279 questions
6
votes
3 answers
Is it possible to use IBDesignable with UICollectionViewCells and live render them in storyboard?
I know how to use @IBDesignable with custom views.
but is it possible to use IBDesignable for cells and render them in storyboard?
for example: i have a collectionViewController in storyboard, and added a uiCollectionCell and specified class as my…

farzadshbfn
- 2,710
- 1
- 18
- 38
6
votes
3 answers
Is it possible to make @IBDesignable override Interface Builder values?
For example, I want to subclass UIButton and set it's font to 20.0f by default. I can write something like this:
@IBDesignable
class HCButton: UIButton {
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
…

orkenstein
- 2,810
- 3
- 24
- 45
5
votes
2 answers
Is IBDesignable broken for AppKit in Xcode 9.2 and Swift 4?
Most questions, and answers related to this, are based on older versions of both Xcode and Swift. Additionally, 90 percent of the questions relate to UIKit and drawing custom controls.
I am adding a standard button, that is centered inside a custom…

TimTwoToes
- 695
- 5
- 10
5
votes
2 answers
Want to achieve the Keyboard selection through @IBInspectable
I wanted to create a keyboard selection from @IBInspectabale
How to achieve this
I am creating a view, In which I insert an ImageView and a TextField,
Now I am creating this custom view class as @IBDesignable and created the @IBInspectable…

nabu
- 552
- 5
- 16
5
votes
1 answer
Xcode IBDesignablesAgentCocoaTouch loads CPU infinitely?
I have a .xib file with extensive usage of IBDesignable views. As view grown I noticed constant CPU load. Now, my view is really big and when I open it in interface builder, ActivityMonitor show this:
. It continues even if I leave .xib file and go…

Fyodor Volchyok
- 5,610
- 4
- 28
- 45
5
votes
1 answer
Layer transform matrix (CATransform3D, etc.) but with IBDesignable?
This class will put perspective on an upright image.
It works perfectly BUT does not work live in Storyboard with IBDesignable. Which is very sad.
Is it possible to use CATransform3D and the like for live display on Storyboard with IBDesignable??
//…

Fattie
- 27,874
- 70
- 431
- 719
5
votes
1 answer
Interface Builder Clipping Designable Views
I really need a hand here. I have created an @IBDesignable subclass of UILabel which works fine in the XCode Interface Builder. However, even if I set 'clipsToBounds' to false, Interface Builder will still clip it whilst changing the @IBInspectable…

Joey Clover
- 756
- 5
- 14
5
votes
1 answer
swift IBDesignable view not show in storyboard
I want to custom a 5-star UIView,also I want it to be render in storyboard. So I decide to use @IBDesignable and @IBInspectable.The following is my code.
import UIKit
@IBDesignable
class RatingView: UIView {
override init(frame: CGRect) {
…

tounaobun
- 14,570
- 9
- 53
- 75
4
votes
0 answers
M1 mac - Xcode 14.3 - Failed to render and update auto layout status
Upgraded to Xcode 14.3 and now all my storyboards won't render IBDesignable's throwing an error:
/Users/****/Documents/Projects/****/****/Modules/Onboarding/Base.lproj/Onboarding.storyboard
Failed to render and update auto layout status for…

Simon McLoughlin
- 8,293
- 5
- 32
- 56
4
votes
1 answer
IBDesignable UIView Subclass Always Fails to Render in Interface Builder
I see a number of questions about this, but few answers (one answer solved a previous similar issue, but not this one).
THE PROBLEM
I have an IBDesignable class. It derives from UIControl, but the same thing happens if I derive from UIView.
It…

Chris Marshall
- 4,910
- 8
- 47
- 72
4
votes
0 answers
@IBDesignable not rendering UILabel and UITextField texts
I've created a @IBDesignable subclass of UIView
The view has couple of labels and a text field.
When I try to change their value in the storyboard, the changes are not rendered. In constant changes in cornerRadius, borderWidth and borderColor are…

Luda
- 7,282
- 12
- 79
- 139
4
votes
2 answers
How can I fix this warning msg. Warning: Ignoring user defined runtime attribute for key path "radius" on instance of "UIButton"
I am getting this warning message. How can I fix this.
Warning: IB Designables: Ignoring user defined runtime attribute for key path radius on instance of UIButton. Hit an exception when attempting to set its value: [ setValue:forUndefinedKey:]:…

Rafiqul Hasan
- 3,324
- 4
- 20
- 28
4
votes
3 answers
IBDesignable UI is not showing in Xcode 9 with Swift
I trying to using my custom xib files. But those UI are not showing in main view controller in xcode. But it show when run the app. I already added @IBDesignable in class. Here is what i did.
I created TestView.xib and added some design
I created…

Thet Paing Soe
- 91
- 2
- 10
4
votes
1 answer
@IBDesignable class with .xib-File not rendering in Interface Builder
I have a CustomClass.swift and a CustomClass.xib. I want XCode's Interface Builder to render views of class CustomClass using the provided .xib-File. Just like it does when I run the app.
I am using XCode 8.3.2 (8E2002)
CustomClass.swift
import…

Marmelador
- 947
- 7
- 27
4
votes
1 answer
Swift - @IBDesignable - Rotation not shown inside Storyboard
Why is transform rotation not shown/previewed inside the storyboard? It works fine in the app . I have other attributes inside my @IBDesignable class that works fine.
How can I achieve this?
@IBDesignable
class CustomUILabel: UILabel {
…

SNos
- 3,430
- 5
- 42
- 92