Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 8
    Interesting. Is class deprecated in Swift 4.1? Commented Feb 19, 2018 at 15:21
  • @hnh You can still make a "pseudo-protocol" by making it a class, but protocol: AnyObject does exactly what the OP is asking for with less side effects than making it a class. (you still can't use such a protocol with value types, but declaring it a class won't solve that either) Commented Oct 4, 2018 at 11:54