Reputation: 742
I have used InteractiveSideMenu which is swift library. Now I want to adopt swift protocol into my objective-c class for that I have to make my objective class's base class to swift class which is somehow disallow.I don't know how to achieve this. can somebody help me out on this?
@interface my_objectiveC_Class : UIViewController
{
}
Now, instead of UIViewController class I have to make it some swift class like MenuViewController but its not allowed to make swift class as base class of objective-c class.
Basically I need to adopt swift protocol inside my objective-c class.
Upvotes: 0
Views: 763
Reputation: 3677
To use any Swift
code into Objective-C
or Objective-C
code into Swift
you need a Bridging-Header
to let your compiler translate between two languages.
See this AppleDoc
Upvotes: 1