Objective-C syntax: <>

75 Views Asked by At
@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?

3

There are 3 best solutions below

0
On BEST ANSWER

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.

0
On

As C is a protocol so A conforms to protocol C.

0
On

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.