# Designable Protocols

**URL:** <https://forums.swift.org/t/designable-protocols/5712>\
**Category:** Using Swift\
**Created:** [April 19, 2017, 2:43am UTC](https://forums.swift.org/t/designable-protocols/5712 "2017-04-19T02:43:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cavelle\_Benjamin](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/cavelle_benjamin/32/2888_2.png) [@Cavelle\_Benjamin](https://forums.swift.org/u/Cavelle_Benjamin)\
**Post date:** [April 19, 2017, 2:43am UTC](https://forums.swift.org/t/designable-protocols/5712/1 "2017-04-19T02:43:53Z")

</div>

I don’t post to this mailing list very often.

Working on updating my app to have a base set of code that cuts across macOS, iOS, tvOS, watchOS

I’m writing a protocol to use across all the platforms that would be “designable” inside Interface Builder, but I cannot make protocol variables Inspectable when they are defined implemented in the class/struct. Any thoughts on making this possible?

> **[IBDesignable protocols ($1658032) · Snippets · Snippets · GitLab](https://gitlab.com/-/snippets/1658032)**
>
> GitLab.com

Cheers,  
CB  
web: [https://thecb4.io](https://thecb4.io) \<[https://thecb4.io/&gt](https://thecb4.io/&gt);  
twitter: @\_thecb4

---

<div class="post-metadata">

**Author:** ![Dennis\_Weissmann](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@Dennis\_Weissmann](https://forums.swift.org/u/Dennis_Weissmann)\
**Post date:** [April 19, 2017, 5:14am UTC](https://forums.swift.org/t/designable-protocols/5712/2 "2017-04-19T05:14:35Z")

</div>

Are you sure that's because it's defined in a protocol and not because it's a `CGColor`. Can you try it with `UIColor`? I don't think CG types are supported with `@IBInspectable`.

- Dennis

> **···**
>
> Sent from my iPhone
> 
> > On 19. Apr 2017, at 4:43 AM, Cavelle Benjamin via swift-users \<swift-users@swift.org\> wrote:
> > 
> > I don’t post to this mailing list very often.
> > 
> > Working on updating my app to have a base set of code that cuts across macOS, iOS, tvOS, watchOS
> > 
> > I’m writing a protocol to use across all the platforms that would be “designable” inside Interface Builder, but I cannot make protocol variables Inspectable when they are defined implemented in the class/struct. Any thoughts on making this possible?
> > 
> > [IBDesignable protocols ($1658032) · Snippets · GitLab](https://gitlab.com/snippets/1658032)
> > 
> > Cheers,  
> > CB  
> > web: [https://thecb4.io](https://thecb4.io)  
> > twitter: @\_thecb4
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > swift-users mailing list  
> > swift-users@swift.org  
> > [https://lists.swift.org/mailman/listinfo/swift-users](https://lists.swift.org/mailman/listinfo/swift-users)
