Xcode-有没有一种方法可以暂时禁用所有IBInspectable来加速Storyboard?

时间:2019-04-05 18:15:27

标签: ios xcode storyboard ibdesignable ibinspectable

我真的很喜欢import { EventBus } from "../../event-bus.js"; //Import event Bus export default { data(){ return{ products:[] // Change by array } }, created() { this.loadProducts(); //listen event loadProducts EventBus.$on("loadProducts", () => { this.loadProducts(); }); Fire.$on('searching', () => { let query = this.$parent.search; axios.get('/api/findProduct?q=' + query ) .then( ({data}) => { this.products= data; }) .catch(()=>{ }); }) } } IBInspectable功能,这些功能可以直接在Storyboard中加快速度并更好地查看最终结果。但是,天哪……它们会减慢我的故事板加载速度,并且每次我编辑包含带有IBDesignable视图的控制器时,都会使故事板的加载速度变得非常缓慢。它几乎无法使用(在2018 MBP,16GO RAM上)。我使用IBInspectable的两个库是PMSuperButtonHero

请注意,与这个问题相反,它不是在重建:IBDesignable view causes endless rebuilding。另外请注意,取消勾选IBInspectable不会改变任何内容。

所以我正在寻找一种方法来临时禁用所有它们,因为通常我不需要它们。

我在想一个可以切换它的宏:

Automatically Refresh Views

但这不能完成任务。即使它起作用了,我也不知道不支持宏的Swift。

有人有执行此操作的想法吗?

0 个答案:

没有答案