Here’s a sample project —
Prabhu S

Sorry for getting back so late to you. I didn’t have access to developer environment.

This is a known issue in swiftc: Enable the Whole Module or Single File Optimizations to fix it.

Also, please note, that the article talks about the approach in general. E.g., as of now this approach is not compatible with IB because it doesn’t see the generic subclasses. You would have to either create the view programmatically in loadView or implement the same approach using protocols and protocol type constraints (I will be posting the article about that later on, as an extension to the topic, as I was asked about that multiple times already).

Show your support

Clapping shows how much you appreciated IDAP’s story.