Questions tagged [ibdesignable]

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.

279 questions
0
votes
1 answer

Strange error in storyboard for custom control

This is the error: Base.lproj/Main.storyboard: error: IB Designables: Failed to update auto layout status: The agent raised a "NSInternalInconsistencyException" exception: could not dequeue a view of kind: UICollectionElementKindCell with identifier…
Paul T.
  • 4,938
  • 7
  • 45
  • 93
0
votes
1 answer

Custom control within framework not configurable or visible in Xcode

I have created a small selection of custom controls that are tagged @IBDesignable to enable visual configuration within IB. They work perfectly in their parent project/workspace and, as I wanted them to be reusable, I've created a framework. After…
rustproofFish
  • 931
  • 10
  • 32
0
votes
1 answer

IBDesignable UILabel setting text to NSLocalizedString in drawRect or willMoveToSuperview crashes Xcode

I am trying to retroactively localize an app by subclassing an IBDesignable to have a property like so: @property IBInspectable NSString *localizedKey; Then I thought I could easily override the proper function in the UILabel's lifecycle to do…
helloB
  • 3,472
  • 10
  • 40
  • 87
0
votes
1 answer

UISlider - IB_DESIGNABLE - runtime attribute warning

I am trying to render a vertical slider in interface builder however, when I try to set the value interface builder gives me a warning. What am I doing wrong here? @IBDesignable class VerticalSlider: UISlider { @IBInspectable var…
SNos
  • 3,430
  • 5
  • 42
  • 92
0
votes
1 answer

Custom views with UIPanrecognizer unintendetly locks UITableViewController

I would like to place custom views (created from nib) inside UITableViewCells. That works without issues, unless the custom view declares it's own single touch UIPanrecognizer. In those cases my custom view responds to the pan events, but that…
DudeOnRock
  • 3,685
  • 3
  • 27
  • 58
0
votes
1 answer

IBInspectable property values not updating in xib

I'm running into a minor complication using IBInspectable properties and not sure if it might have something to do with my xibs and xib usage. I'm trying to reuse a custom control between multiple view controllers. The control is a custom tab…
zic10
  • 2,310
  • 5
  • 30
  • 55
0
votes
1 answer

IBDesignable crash EXC_BAD_ACCESS when attempting to call loadNibNamed

I have a base class called DesignableControl. I use it in my custom views so that I can see them rendered in the storyboard. Here is the base class: public class DesignableControl: UIControl { private var view: UIView! override public…
Albert Bori
  • 9,832
  • 10
  • 51
  • 78
0
votes
1 answer

IBDesignable controls in a framework

I've watched the excellent video on IBDesignable https://developer.apple.com/videos/play/wwdc2014-411/ and have created a framework with a control in, to be used by my main app (and shared, if necessary). I've created a custom 'composite' control…
Fittoburst
  • 2,215
  • 2
  • 21
  • 33
0
votes
1 answer

IBDesignable can't set background on buttons

I'm trying to create a custom button in my IOS project. But when I'm creating the button with the my class the background doesn't work in the storyboard. But when I run the program the button works fine. Here you see my class @IBDesignable class…
Anders Andersen
  • 2,377
  • 2
  • 17
  • 25
0
votes
1 answer

CGContextRef isn't working with @IBDesignable (Error:The agent Crashed)

I am creating a UIButton subclass to add some drawing . It is working fine in code . It is giving following error when i am trying via @IBdesignable . error: IB Designables: Failed to update auto layout status: The agent crashed error: IB…
MOHAMMAD ISHAQ
  • 988
  • 7
  • 15
0
votes
1 answer

Can we use IB_DESIGNABLE with category?

I found IB_DESIGNABLE very useful and I am able to design anything with SubClassing and IB_DESIGNABLE but is it possible to use IB_DESIGNABLE same as we use in sub class with category ?
Varun Naharia
  • 5,318
  • 10
  • 50
  • 84
0
votes
1 answer

Can a value of a var in @IBDesignable depend on external values, such as a frame of a view?

I want to draw a shape hole in an @IBDesignable view. For this I need the size of a view, which is above in the view hierarchy. This view changes it's size by constraints. How to retrieve the frame? May this is not possible at all, because the view…
wider-spider
  • 465
  • 4
  • 12
0
votes
1 answer

How do I use IBDesignable/IBInspectable with CocoaPods in an Objective-C only project

My project is Obj-C only. Via Cocoapods, I tried installing an Obj-C library that takes advantage of IBDesignable and IBInspectable. If I add that project to my library and run 'pod install' I get two errors when building/running: error: IB…
0
votes
1 answer

IB_DESIGNABLE tintColor issues

I'm getting into IB_DESIGNABLE, and I've stumbled over an issue. When I set the tintColor of my custom view with IB, it is rendered in the right way in the IB. But when I run it on the device it is displayed with default tintColor. #pragma mark -…
BergP
  • 3,453
  • 4
  • 33
  • 58
0
votes
2 answers

IBDesignable not displaying programmatic UI elements

I created a custom ViewController class, ViewControllerRootHomeCenter which is inheriting from UIViewController, and checked the box to create a accompanying XIB file. I set the File's Owner Custom Class attribute to ViewControllerRootHomeCenter. …
ipatch
  • 3,933
  • 8
  • 60
  • 99
1 2 3
18
19