UIButton with IB_DESIGNABLE throws runtime attribute warning and does not render in Interface Builder

前端 未结 7 625
耶瑟儿~
耶瑟儿~ 2021-01-30 12:59

I\'m running Xcode 6.1 and I have been using IB_DESIGNABLE with IBInspectable for quite a few projects already but all of the sudden it just doesn\'t work anymore. I have create

7条回答
  •  别那么骄傲
    2021-01-30 13:39

    I had a similar problem, but I actually removed the property from the class and Interface Builder was still complaining about the missing property, tough.

    Tried many things, like cleaning, rebuilding... But nothing worked!

    What really solved was right clicking in the Storyboard file, selecting "Open As" and then "Source code". This opened the storyboard XML content in the editor and I was able to look for references to the missing property until I found the section:

    
        
        ...
    
    

    After removing the whole section, I saved the file and refreshed the view in Interface Builder. Now all warnings are gone!

提交回复
热议问题