Swift 3: Is there a way to cast an object to a class and protocol at the same time?
问题 I've read through the relevant sections of Apple's Swift iBook (Type Casting & Protocols) but I can seem to find a way to specify that an object is an instance of a particular class that conforms to a specific protocol. As an example in tableView(_: , cellForRowAt: ) I would like to cast the cell returned by tableView.dequeueReusableCell(withIdentifier: reuseID, for: indexPath) as being a subclass of UITableViewCell that conforms to the RLMEntityCapableCell protocol (Just specifies that