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
2
votes
0 answers
The right placeholder of custom UITextField in Swift 3 cannot display when I add constraints to it
I'm a beginner of Swift 3 and I plan to write several Custom Control (IBDesignable) in XCode 8. When I write a custom text field, I want to add right placeholder to it. However, the right placeholder would only display successfully when this text…

Chuong Huynh
- 84
- 1
- 6
2
votes
0 answers
Is it possible to hide ibinspectable variables of the custom class?
Hide IBInspectable Variables
This is how it looks
Also I want to know if it is possible to make an enum of strings.
I'm working with Swift 2.2 and Swift 3
@IBDesignable class example : some class {
@IBInspectable var makeMagic : bool = false
…

David Castro
- 193
- 1
- 6
2
votes
1 answer
Trying to create a rounded corner UIButton class
I am trying to create a rounded corner UIButton class but it is not working. This is what I have so far:
interface
#import
IB_DESIGNABLE
@interface BotaoCantosArredondados : UIButton
@property (nonatomic, assign) IBInspectable…

Duck
- 34,902
- 47
- 248
- 470
2
votes
1 answer
Stretching and kerning type, not working in Storyboard with @IBDesignable
Here is a IBLabel which tracks / stretches the font.
It works perfectly in the build. But the change doesn't show live in Storyboard.
// UILabel, but you can set
// the tracking (that's the overall amount of space between all letters)
// and…

Fattie
- 27,874
- 70
- 431
- 719
2
votes
0 answers
Changing a CAShapeLayer path
I have a button I would like to scale according to the frame size. However, when I change the underlying CALayer paths they do not get updated. In the updateLayerProperites function I use CALayer'a setValue function to change the path. I have also…

arynhard
- 173
- 9
2
votes
1 answer
Sse IBInspectable and IB_DESIGNABLE Bug changes not show in storyboard?
I reading this article IBInspectable / IBDesignable and flow step,But I found change not immediately rendered on storyboard.Can anyone known why?
My Xcode Version:7.1
My main code:
ViewController.h
#import
IB_DESIGNABLE
@interface…
user5777248
2
votes
0 answers
Make Interface Builder draw IB_DESIGNABLE subviews with the currently selected size class
I have a XIB (file's owner: DesignableView) that I laid out in Interface Builder in two different size classes:
DesignableView.xib: Any | Any
DesignableView.xib: Regular | Any
I want to use this DesignableView inside another XIB file. As I am a…

Mischa
- 15,816
- 8
- 59
- 117
2
votes
1 answer
@IBInspectable not updating Story Board
My custom button below works fine on the iOS Simulator - when I set a rotation in Interface Builder it rotates the button when I run the app.
However, I can't see the rotation in the Story Board - it just shows the button without applying the…

henrikstroem
- 2,978
- 4
- 35
- 51
2
votes
1 answer
Storyboard UIView background color disappears when assigned @IBDesignable custom class
Steps to reproduce:
Create class like MyIcon below;
Drag a UIView onto storyboard (background is white);
Set UIView's custom class to MyIcon; and
Background color disappears.
MyIcon.swift:
import UIKit
@IBDesignable class MyIcon: UIView {}
See…

Joseph Beuys' Mum
- 2,395
- 2
- 24
- 50
2
votes
0 answers
UIButton Background Colour Programmatically
I have created a series of 'translucent' UI elements using @IBDesignable where I set the background colour to white with a low, partial alpha.
This works for UIView but for UIButton the background stays clear and the text colour, while correctly…

clicky
- 865
- 2
- 14
- 31
2
votes
0 answers
IOS. Remove IBDesignable constrain
I am using third party lock screen JKLlockscreen in my project. and the lockscreen uses IBDesignable constrain. but it is not completely fitted in iphone 4 screen or etc. when i set , moreover it gives error like this in…

Badal Shah
- 7,541
- 2
- 30
- 65
2
votes
0 answers
UIPickerView doesn't play well with @IBDesignable
I'm creating a custom @IBDesignable component that embeds a UIPickerView on white background. Everything looks great at runtime. In the Interface Builder however, my picker view looks like this:
Any ideas how to get rid of the dark overlay?

Rudolf Adamkovič
- 31,030
- 13
- 103
- 118
2
votes
1 answer
IB_DESIGNABLE never works for NSTextFieldCell
I have a NSTextFieldCell subclass with this only code in the implementation:
- (NSRect)drawingRectForBounds:(NSRect)theRect
{
// Get the parent's idea of where we should draw
NSRect newRect = [super drawingRectForBounds:theRect];
//…

UFO
- 219
- 3
- 8
2
votes
2 answers
IB_DESIGNABLE draw image
I've created a simple view that will show some AVPlayer content, or if this does not exist (initial state) draw a splash image.
I've added the IB_DESIGNABLE directive, and am drawing the splash image in drawRect. However, in Interface Builder, the…

Jasper Blues
- 28,258
- 22
- 102
- 185
1
vote
0 answers
cocoapods issue with IBDesingables
it's first time for me to develop my own pod and i create a pod with an example to implement the pod, the pod is working great but i wanted that user to be able to init with coding or using Storyboard so i tried to use @IBDesignable and…

belal medhat
- 462
- 1
- 4
- 18