Interface Builder does not reset a view after removing IBDesignable

Originator:skagedal
Number:rdar://26880503 Date Originated:19-Jun-2016 08:42 AM
Status:Open Resolved:
Product:Xcode Product Version:Version 7.3.1 (7D1014)
Classification:Other Bug Reproducible:Always
 
Summary:
After removing @IBDesignable / IB_DESIGNABLE from a view, Xcode does not change the rendering of the view.

Steps to Reproduce:
1. Create a new iOS application with the "Single View" application
2. Create a UIView subclass with some simple drawing code. Add an instance of it to your storyboard.
3. Add @IBDesignable / IB_DESIGNABLE to the view.
4. Watch it render.
5. Remove @IBDesignable / IB_DESIGNABLE

A trivial example project is attached.

Expected Results:
After step 5, if "Automatically Refresh Views" is enabled, the view in the storyboard should be reset to default (empty) drawing. In any case, this should happen if "Refresh All Views" is pressed.


Actual Results:
The view keeps drawing with the version of the code before @IBDesignable / IB_DESIGNABLE was removed. 


Version:
Version 7.3.1 (7D1014)

Notes:
Closing and reopening the project solves the problem. 

Configuration:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!