Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can @interface have more than one class? [duplicate]

Possible Duplicate:
Objective-C multiple inheritance

In my application, I need to add SideSwipeTableViewController and PullRefreshTableViewController to ViewController.h. However, for some reason, it will give me an error when I try to build the app.

Here is the code:

@interface ViewController : SideSwipeTableViewController, PullRefreshTableViewController  {

    ...

}

It works when either one is in, but not both. What I want to know is: is there a way to successfully implement these two classes? Thanks in advance and my apologies with the question: I'm still a bit new to Objective-C.

like image 924
chrisjr Avatar asked Jan 30 '26 07:01

chrisjr


1 Answers

There is no multiple inheritance in Objective-C. You can implement any number of protocols though.

like image 189
DrummerB Avatar answered Feb 01 '26 21:02

DrummerB



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!