ios - @IBDesignable crashing agent -


when write own uibutton-extended class , make @ibdesignable, receive 2 errors in interface builder, namely:

  • main.storyboard: error: ib designables: failed update auto layout status: agent crashed because fd closed
  • main.storyboard: error: ib designables: failed render instance of randjeuibutton: agent crashed

here code:

import uikit  @ibdesignable class randjeuibutton: uibutton {     required init(coder adecoder: nscoder) {         super.init(coder: adecoder)          self.backgroundcolor = uicolor.blackcolor()     } } 

i working in xcode 7 beta 2 on os x 10.11 beta 2. (running in vm)

xcode's interface builder requires implement both or neither initializers @ibdesignable classes render in ib.

if implement required init(coder adecoder: nscoder) you'll need override init(frame: cgrect) well, otherwise "the agent crash" seen in errors thrown xcode.

to add following code class:

override init(frame: cgrect) {     super.init(frame: frame) } 

Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -