Ruhi
Ruhi

Reputation: 137

How to call swift class function from objective c class

The below code is written in swift class

 override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
    dim(.In, alpha: dimLevel, speed: dimSpeed)
}


@IBAction func unwindFromEditAboutUs(segue: UIStoryboardSegue)
{
    dim(.Out, speed:dimSpeed)

}

I want to call this class functions from my objective C class.... plz. suggest me how can I do this...

Upvotes: 0

Views: 1451

Answers (2)

Maninderjit Singh
Maninderjit Singh

Reputation: 1456

Simply import swift class in objective C Project

#import"ProjectName-Swift.h"

Upvotes: 1

Ketan Parmar
Ketan Parmar

Reputation: 27448

You should make bridge to do this kind of stuff. Refer this link or this link and this apple documentation. Hope this will help you :)

Upvotes: 0

Related Questions