当前位置: 动力学知识库 > 问答 > 编程问答 >

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...

网友答案:

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 :)

网友答案:

Simply import swift class in objective C Project

#import"ProjectName-Swift.h"
分享给朋友:
您可能感兴趣的文章:
随机阅读: