I really like IBInspectable and IBDesignable features, that allow to speed up things and have a better view of final result, directly in Storyboard. But Gosh…they slow down soooo much my storyboard loading, and makes it very laggy every time I edit a controller that include a view with IBInspectable. It is barely unusable (on 2018 MBP, 16GO RAM). The two libs I have that use IBInspectable are PMSuperButton and Hero.
Note that it is NOT rebuilding, contrarily to this question : IBDesignable view causes endless rebuilding. Also note that unticking Automatically Refresh Views doesn't change anything.
So I'm searching for a way to temporarily disable all of them, as most often I don't need them.
I was thinking of a macro that would be able to toggle it :
#define IBInspectable_togglable IBInspectable //enabled
//#define IBInspectable_togglable //disabled
But this doesn't do the job. And even if it has worked, I had no clue for Swift, which doesn't support macros.
Does anyone has any idea to perform this ?
You just need to close the project, and open up the
xiborstoryboardin Xcode without opening the whole project.That will stop customized
IBInspectablefrom loading.This will allow you to get a great experience in designing the whole view without lags in your case.