uber / cyborg

Display Android Vectordrawables on iOS.
Apache License 2.0
300 stars 19 forks source link

Support Interface Builder #71

Open flatslats opened 4 years ago

flatslats commented 4 years ago

It would be extremely useful to support placement of VectorViews in Interface Builder. Programmatic layout is cumbersome and increases development time.

benpious commented 4 years ago

Thanks for opening an issue. This might be investigated at some point, and I'd be happy to review a PR, but unfortunately supporting IB isn't a priority for us.

In my experience, IB doesn't really play well with constructor injection and eliminating unnecessary optionals, which is the style of programming that we try to encourage. I think it would be a challenge to make this work in a reliable way that didn't require undesirable changes to the existing API.

flatslats commented 4 years ago

Thanks for your response. I've wrapped a VectorDrawable in an IBDesignable class and implemented prepareForInterfaceBuilder(), which gives a workaround suitable for my needs.