title: IB_DESIGNABLE, IBInspectable -- Interface builder does not update
body: <p>I have the following set of code:</p>
  
  <h3>CustomView.h</h3>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  IB_DESIGNABLE
  @interface CustomView : UIView
  
  @property (nonatomic) IBInspectable UIColor *borderColor;
  @property (nonatomic) IBInspectable CGFloat borderWidth;
  @property (nonatomic) IBInspectable CGFloat cornerRadius;
  
  @end
  </code></pre>
  
  <h3>CustomView.m</h3>
  
  <pre><code>#import "CustomView.h"
  
  @implementation CustomView
  
  - (void)setBorderColor:(UIColor *)borderColor {
      _borderColor = borderColor;
      self.layer.borderColor = borderColor.CGColor;
  }
  
  - (void)setBorderWidth:(CGFloat)borderWidth {
      _borderWidth = borderWidth;
      self.layer.borderWidth = borderWidth;
  }
  
  - (void)setCornerRadius:(CGFloat)cornerRadius {
      _cornerRadius = cornerRadius;
      self.layer.cornerRadius = cornerRadius;
  }
  
  @end
  </code></pre>
  
  <hr>
  
  <p><sub>(For Swift reference, this problem was also occurring with Swift code)</sub></p>
  
  <h3>CustomView.swift</h3>
  
  <pre><code>@IBDesignable
  class CustomView : UIView {
      override init(frame: CGRect) {
          super.init(frame: frame)
      }
  
      required init(coder aDecoder: NSCoder) {
          super.init(coder: aDecoder)
      }
  
      @IBInspectable var borderColor : UIColor = UIColor.clearColor() {
          didSet {
              self.layer.borderColor = borderColor.CGColor
          }
      }
  
      @IBInspectable var borderWidth : CGFloat = 0.0 {
          didSet {
              self.layer.borderWidth = borderWidth
          }
      }
  
      @IBInspectable var cornerRadius : CGFloat = 0.0 {
          didSet {
              self.layer.cornerRadius = cornerRadius
          }
      }
  }
  </code></pre>
  
  <hr>
  
  <p>I added a <code>UIView</code> to a view controller on the storyboard and set its subclass to <code>CustomView</code>.</p>
  
  <p><img src="https://i.stack.imgur.com/FwER3.png" alt="enter image description here"></p>
  
  <p>This adds the "Designables" row.  It is stuck on "Updating" and the tooltip says "Waiting for Target to Build".  It never changes from this status.</p>
  
  <p>When I move to the attributes inspect, I am able to set these <code>IBInspectable</code> properties:</p>
  
  <p><img src="https://i.stack.imgur.com/A8WmG.png" alt="enter image description here"></p>
  
  <p>And once set, they also show up in the "User Defined Runtime Attributes":</p>
  
  <p><img src="https://i.stack.imgur.com/LU1eQ.png" alt="enter image description here"></p>
  
  <p>However, the "Designables" status never moves beyond "Updating" with still the same tooltip (I've tried Cmd+B building several times, nothing changes).</p>
  
  <p>Moreover, as I set the <code>IBInspectable</code> properties, I get a warning for each one:</p>
  
  <blockquote>
    <p><strong>IBDesignables</strong> - Ignoring user defined runtime attribute for key path "borderColor" on instance of "UIView" ... this class is not key-value coding-compliant for the key borderColor.</p>
  </blockquote>
  
  <p>Screenshot of the warnings generated:</p>
  
  <p><img src="https://i.stack.imgur.com/wZruU.png" alt="enter image description here"></p>
  
  <hr>
  
  <p>I am familiar with the key-value coding-compliant issues and generally know how to solve them... but I don't understand how to solve this issue here.  According to the view's identity inspector, the view is a "CustomView" (not a regular "UIView", which doesn't have these properties).  And if the view weren't a "CustomView" then these designable properties wouldn't show up in the Attributes Inspector, right?  But when Interface Builder tries to apply these attributes to the view, it goes back to thinking the view's class is "UIView" and cannot apply the attributes.</p>
  
  <p>Any help?  Please let me know if I've left out some important detail, but for what it's worth, <a href="http://www.weheartswift.com/make-awesome-ui-components-ios-8-using-swift-xcode-6/" rel="noreferrer">I followed this tutorial exactly</a> (other than ObjC vs Swift).  It's also worth noting that I followed this tutorial exactly on another machine and it worked like a charm (I intended to make this post last night but the computer I was on then didn't have this issue).</p>
  
  <hr>
  
  <p>Based on comments, it has been suggest that perhaps the <code>.m</code> file isn't included and that might be causing the problem.  I thought surely I would have gone out of my way for this scenario to be the case, but I checked anyway.</p>
  
  <p><img src="https://i.stack.imgur.com/hh9Uz.png" alt="enter image description here"></p>
  
  <p>When I first started attempting to do this, I was under the understanding that the <code>IB_DESIGNABLE</code> classes had to be part of a different <code>UIKit</code> framework.  So from this first screenshot, you can see that I set up a "CustomViews" framework, which has one class, <code>CustomView</code>.  You'll also see here that I also created a <code>OtherView</code>, which is identical to <code>CustomView</code>, except it's not in a separate framework.  The identical problem persists on the storyboard between both classes however.</p>
  
  <p>Here we have a screenshot indicating that <code>CustomView.m</code> is included to be built with the <code>CustomViews</code> framework:</p>
  
  <p><img src="https://i.stack.imgur.com/sTY9F.png" alt="enter image description here"></p>
  
  <p>Meanwhile, the following screenshot indicates several things:</p>
  
  <ul>
  <li><code>CustomViews.framework</code> is appropriately included in the main project.</li>
  <li><code>OtherView.m</code> is also included as a compile source, so even if something is wrong with <code>CustomView</code>, <code>OtherView</code> should work, however it generates identical errors.</li>
  <li><code>Main.storyboard</code> and <code>LaunchScreen.xib</code> are showing up as red.  I have no idea why, and haven't the slightest clue as to why <code>LaunchScreen.xib</code> should (I haven't touched this file), though I can say after looking at other projects, <code>Main.storyboard</code> also shows up in red for those projects, and I'm not doing anything with <code>IB_DESIGNABLE</code> or <code>IBInspectable</code> there.</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/lJlpN.png" alt="enter image description here"></p>
  
  <hr>
  
  <p>I have tried and retried this several times now.  It works every time on my computer at home--I can not reproduce the problem described in this question at home.  At work, it never works.  The problem described in this question happens every time.</p>
  
  <p>Both computers are Mac Minis purchased new this year (not the new models, late 2012 model).  Both computers are running  OS X Yosemite 10.10.  Both computers are running Xcode Version 6.1.  At home, the build is (6A1052d).  This morning, I can confirm that both computers are running identical builds of Xcode.  </p>
  
  <p>Others have suggested to me that it might be bad RAM.  That seems far fetched to me.  I've restarted the project multiple times, restarted the computer multiple times.  Seems to me if there were bad RAM on a computer approximately 6 months old, that I'd be seeing other problems, and that this problem would be less consistent.  But this exact problem persists despite numerous times restarting the entire project from scratch and full restarts on the computer.</p>
  
  <hr>
  
  <p>It should be worth noting that if I actually compile and run this project, the custom view with the <code>IBInspectable</code> properties actually displays as I expect the storyboard to display it.  I imagine that this would be the case even with out the <code>IB_DESIGNABLE</code> and <code>IBInspectable</code> directives however, as these are created as User Defined Runtime Attributes.</p>