Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
64 views

How to make an IBDesignable image down sampling function in Swift?

I faced and issue with images using too much memory when running the app. A 905kb SVG image was taking around 150mb when presented and this image was being cached by the system. Loading several ...
Zyfe3r's user avatar
  • 653
4 votes
0 answers
990 views

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 ...
Simon McLoughlin's user avatar
1 vote
0 answers
99 views

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 ...
belal medhat's user avatar
0 votes
1 answer
1k views

Failed to render and update auto layout

I am using Xcode 13.4.1 in Rosseta mode on Macbook Pro (M1 chip) running macOS Monterey v12.0. Basically, IBDesignable views are not getting updated in XIB and throwing weird errors. All the details ...
dev gr's user avatar
  • 2,431
0 votes
0 answers
313 views

How to use color sets in designable views in storyboards?

The situation and steps to reliably reproduce: Set up a macOS app project with Swift and storyboards for UI in Xcode. Define an arbitrary color for the "AccentColor" color set in the asset ...
p13n's user avatar
  • 994
0 votes
1 answer
426 views

AppClip - this class is not key value coding-compliant for the key labelColor

I have an existing App in the AppStore and I am building a POC AppClip for it. I have created the AppClip (using storyboards) and I am trying to reuse classes from the main App in Xcode. I have custom ...
AppDever's user avatar
  • 707
0 votes
1 answer
95 views

Designable view not rendered at correct position in Storyboard

I have a custom designable view class that looks like this: @IBDesignable class AuthInputView: UIView { static let nibName = "AuthInputView" @IBOutlet weak var mainContainerView:...
Whirlwind's user avatar
  • 13.6k
0 votes
1 answer
108 views

Can we use a nested class for IBDesignable?

I am developing a graphic library in Swift. The code cannot be shared, but I made a sample here (see the button example, Radio buttons were dedicated to another question). I would like to have a ...
Carl Sarkis's user avatar
2 votes
1 answer
114 views

IBDesignable rendered at the top left of the screen instead of their correct position

I have a custom implementation of a checkbox / radio button in Swift. The class is annotated as @IBDesignable. I implement layoutSubviews and prepareForInterfaceBuilder. This implementation is ...
Carl Sarkis's user avatar
1 vote
1 answer
123 views

IBDesignable custom NSControl class - frame not resizing in Interface Builder

This is for macOS, not iOS ... thank you. I have a very simple custom slider control that has 2 @IBInspectable properties - trackHeight and knobHeight. I want my control's frame in Interface Builder ...
user avatar
5 votes
1 answer
855 views

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 ...
Chris Marshall's user avatar
0 votes
0 answers
100 views

Is there a specific way of using pods or IBDesignables in iOS Frameworks?

I am working on a framework project. I have added a custom view using IBDesignable in the framework (present within the framework under the same target). I am using the 'TinyConstraints' pod for ...
Anish Kumar's user avatar
1 vote
0 answers
237 views

Custom UIView with IBDesignable UIView inside not showing in app

I'm trying to create a UIView with this style: I made the circles using an @IBDesignable class, using the code in this answer: import UIKit @IBDesignable class CircleView: UIView { private var ...
Frakcool's user avatar
  • 11.1k
0 votes
1 answer
168 views

Crash on DidSet from external XIB

I have an external XIB that is @IBDesignable. Inside the view that shows this XIB, I have this outlet. @IBOutlet weak var digitizingButton: DigitizingButton! { didSet { digitizingButton....
Ronnie's user avatar
  • 362
0 votes
1 answer
96 views

UIBezierPath draws differently in storyboard and simulator

I'm creating a custom IBDesignable control and I want to draw a set of squares in there. I have a draw(_ rect:) method which does the following: override func draw(_ rect: CGRect) { // ... ...
Alex Barinov's user avatar
1 vote
1 answer
487 views

How to make editable values in storyboard using IBDesignable class?

I'm wondering how to create reusable @IBDesignable class for UITextView with which I could change border width, colour, etc. directly from the Storyboard? Thanks in advance!
sushi's user avatar
  • 157
1 vote
1 answer
543 views

Very Strange Errors From IB During Build With Swift Package, Using IBDesignable

I have developed this shared package. It works fine. In the package test harnesses (3 iOS apps), it works great, and also, the IB storyboard renders the control (It's an IBDesignable). However, when I ...
Chris Marshall's user avatar
1 vote
2 answers
303 views

Custom @IBDesignable UIButton crashes Xcode

I wanted to design a rounded button with a shadow for my iOS project in Swift. So I came up with the following custom button class: import UIKit @IBDesignable class MainButton: UIButton { private ...
Nawabu's user avatar
  • 37
3 votes
0 answers
127 views

How to show IBInspectable of sub component in custom view?

I have a custom view that have a label and text field and was connected to my nib file. I want to edit them using attribute inspector, but the only component that I see on the attribute inspector was ...
Dylan's user avatar
  • 1,313
2 votes
1 answer
3k views

How to find out which constraint is not working or creating problem

I have created custom view for UITableView cell. When The app runs and the UITableView gets populated I gets too much design related warning.Let me quickly share the log for design i am getting [...
A.s.ALI's user avatar
  • 2,082
0 votes
0 answers
48 views

addGestureRecognizer for UIView not being called from @IBDesignable class

This is the code of my @IBDesignable UIView class. I already tried putting it at the beginning before containerView has been made, after been made also. but nothing is working. Please tell me what is ...
Daniel Wijono's user avatar
1 vote
1 answer
1k views

Trouble with IBInspectable and loading a view from xib for Interface Builder

I have a custom class with its own .xib. I'm trying to incorporate IBInspectable to change the color of its background and subviews' backgrounds in IB. In IB, when I leave 'Custom Class' blank, and ...
Paul's user avatar
  • 125
0 votes
0 answers
150 views

@IBDesignable The agent crashed

I have written a subclass for UIButton and I have this error error: IB Designables: Failed to render and update auto layout status for ...: The agent crashed . Could you please tell me what's ...
Kyryl Nevedrov's user avatar
0 votes
2 answers
190 views

Custom UIButton Causes Storyboard Agent Crash Swift

I created a custom UIButton class and it causing the storyboard agent to fail. I'm Including my extensions cause I really don't know what the problem is. I tried to debug this view from the ...
100tomer's user avatar
  • 137
-1 votes
1 answer
267 views

How can i see with @designable this design on storyboard

I'm using masking. My Code: class ViewController: UIViewController { @IBOutlet weak var firstImageView: UIImageView! @IBOutlet weak var seconImageView: UIImageView! let maskView = ...
user avatar
1 vote
2 answers
210 views

IBDesignable's only render in Storyboard, not in standalone XIB's

I haven't read anywhere yet if this is normal, but I can't get IBDesignable views to render in a standalone xib, such as a custom view or even a TableViewCell. When I put them in a storyboard, they ...
Matthew Patience's user avatar
-1 votes
1 answer
224 views

IBDesignable ButtonView right border overlapping on orientation change (Landscape)

I have a problem managing my UITableView with IBDesignable ButtonView and orientation. Basically, the problem happens when I switch to landscape, right border of customView inside UITableViewCell is ...
Ali Ahsan's user avatar
  • 995
2 votes
1 answer
158 views

Is there a way to make a custom constraint work in interface builder?

Make a UIView with a fixed height constraint, notice I set it to say 40 in IB. Change the constraint class to this: @IBDesignable class BadassHeightConstraint: NSLayoutConstraint { override var ...
Fattie's user avatar
  • 12.5k
0 votes
1 answer
497 views

how to set gradient layer width to be the same as button width?

I am new in iOS Development, I want to make gradient rounded button by using this designable class @IBDesignable class GradientButton: UIButton { let gradientLayer = CAGradientLayer() @...
Agung's user avatar
  • 13.6k
1 vote
1 answer
316 views

constraints in prepareForInterfaceBuilder?

I'm no great fan of @IBDesignable, but in playing around with it I find that if you add a subview in prepareForInterfaceBuilder, the subview is added but constraints that you apply to it are not ...
matt's user avatar
  • 534k
0 votes
1 answer
3k views

"Unexpectedly found nil while implicitly unwrapping an Optional value" on overrided init in custom UIView class

I'm trying to make a simple reusable component (actually totally empty, just a background color to distinguish it), but when I try to use the IBDesignable decorator to make it showable in XCode ...
Orionss's user avatar
  • 735
1 vote
1 answer
548 views

IBDesignable's custom background color property doesn't update based on the target

I am running into an extremely specific problem with XCode. Setup Equally named Colors different in Targets I have two targets in my XCode project, Target A and Target B. They both have an ...
TomQDRS's user avatar
  • 895
3 votes
3 answers
2k views

IBDesignable drawings not displaying in storyboard

I am having an issue with IBDesignable elements not appearing in the storyboard view. It seems to be particular to my machine/version of Xcode (2015 11" Macbook Air running MacOS 10.14.4 and Xcode 10....
kamisama42's user avatar
0 votes
1 answer
50 views

Subclassed view's uiimage not appearing as IBDesignable

I have set up a subclassed UIView, and want to see the embedded image in IB - so I've set it as IBDesignable @IBDesignable class DieView: UIView { @IBInspectable var dieImage : UIImage = ...
WishIHadThreeGuns's user avatar
2 votes
2 answers
358 views

Xcode - Is there a way to disable all IBInspectable temporarily, to speed up Storyboard?

I really like IBInspectable and IBDesignable features, that allow to speed up things and have a better view of final result, directly in Storyboard. But Gosh…they slow down soooo much my storyboard ...
AnthoPak's user avatar
  • 4,391
2 votes
1 answer
691 views

Get the type name of derived type in a static method of base class or extension Swift

TL:DR Paste this into Swift playground: import UIKit public protocol NibLoadable { static var nibName: String { get } } extension NibLoadable where Self: UIView { public static var nibName: ...
zaitsman's user avatar
  • 9,489
0 votes
0 answers
186 views

Swift - freezing when UITextField is IBDesignable with UIColor.init AND isSecureText

I have a UITextField whose class is myCustomTextField. When myCustomTextField sets the textColor of the text field with UIColor.init and sets isSecureText to true, the app freezes after I type some ...
Rbar's user avatar
  • 3,898
0 votes
0 answers
185 views

Subclassing UISlider to customize thumb image using IBDesignable/IBInspectable?

I'm using this code from to customize my UISlider's thumbImage. It builds correctly in the storyboard but when I build and run it does not show my image? Could it be because I have it hooked up as an ...
GarySabo's user avatar
  • 6,640
0 votes
2 answers
256 views

How to show image on custom button control in designer

I have a custom button control where I am trying to show an image for the button but it is not appearing despite defining it programatically. @IBDesignable class UCButtonNext: UIButton { // ...
David's user avatar
  • 317
-1 votes
1 answer
58 views

Interface Builder show all @IBInspectable in cascade

I'm maybe too complicated, but here is what I want: @IBDesignable class A: UIView { @IBInspectable var title: String = "" { didSet { setNeedsLayout() } } } @...
Dam's user avatar
  • 577
0 votes
1 answer
128 views

What's the right method to override in an IBDesignable view so it shows up in the Interface Builder?

I am building some IBDesignable views (by code) and I want them to be available in the Interface Builder with the custom changes I’m doing in the *.swift view class. In that case, what is the best ...
marcelosalloum's user avatar
2 votes
1 answer
352 views

IBDesignable class not updating in xcode

I have created a custom IBDesignable UISegmentedControl class. The class has no build errors but has warnings, it does not update inside of Xcode. There are the warnings, see the screenshot below. @...
daviddna's user avatar
  • 163
4 votes
0 answers
1k views

@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 ...
Luda's user avatar
  • 7,008
1 vote
3 answers
312 views

IBDesignable class don't seems to work properly

I'm building a new iOS app with swift and trying to make a custom IBDesignable UIButton class to use in the designer. My code does not seems to work either in the builder or the app itself at runtime. ...
Eitana Aviv's user avatar
0 votes
1 answer
356 views

Set different font as per title and subtitle in UIlabel IBDesignable

I had created the custom class for uilabel with below code: @IBDesignable public class CustomUILabel: UILabel { public override func awakeFromNib() { super.awakeFromNib() ...
ios developer's user avatar
3 votes
1 answer
371 views

UIAppearance overwrites custom textColor on UILabel

I setup UILabel appearance in my app delegate using: UILabel.appearance().textColor = UIColor.white I also have a custom UIView subclass that contains a UILabel along with some other elements (...
BlackWolf's user avatar
  • 5,569
3 votes
1 answer
366 views

@IBInspectable property doesn't show up in Interface Builder

I have a class like this, and this IB doesn't show the property foo1 in inspection pane. @IBDesignable final class Foo: UIView { @IBInspectable var bar1 = CGFloat(0) } What's wrong? (Xcode 10....
eonil's user avatar
  • 85.8k
0 votes
0 answers
497 views

Predefined IBDesignable

I've been searching every possible way I can think off and haven't found a solution. So I was wondering if there is a possibility if you can create list of values for IBDesignable variable and if so, ...
schmru's user avatar
  • 609
2 votes
1 answer
351 views

IBDesignable for UIButton, IBInspectable vars are nil

I am having a strange problem with UIButton. I have the following custom class: import UIKit @IBDesignable class ToggleButton: UIButton { @IBInspectable var state1Image: UIImage = UIImage() ...
Kex's user avatar
  • 8,549
0 votes
1 answer
379 views

why the autolayout is not updated if I use IBDesignable file when i run the app?

here is the project of this problem in the google drive: https://drive.google.com/file/d/1Js0t-stoerWy8O8uIOJl_bDw-bnWAZPr/view?usp=sharing I make a custom navigation bar (the red view in the picture ...
Agung's user avatar
  • 13.6k

1
2 3 4 5 6