Reputation: 6091
@interface A : B<C>
@interface ViewController : UIViewController<MSBClientManagerDelegate>
So I guess I get A is subclass of B, and B is superclass of A, but what's the relationship between B and C?
Upvotes: 1
Views: 48
Reputation: 191
C
is a protocol that defines a set of methods and or properties that a class must implement and/or can implement if it is defined as optional.
Upvotes: 0
Reputation: 53112
In your example above, C
is a protocol. What you're saying in english terms is:
I want a class A
that subclasses from class B
and also conforms to protocol C
.
A protocol is similar to an abstract class in other languages and usually defines a set of methods and or properties that a class must implement in order to conform.
Upvotes: 5