swift类

时间:2016-04-09 11:54:49

标签: objective-c swift

我已经实现了以下链接中提供的代码来获取WiFi网关地址。

How to get the WIFI gateway address on the iPhone?

当我尝试访问返回网关地址的方法(用Objective C编写)时,从Swift类中,它显示以下错误。 "使用未申报的类型' DummyClass' "

我收到错误的swift代码段是:

class ViewController: UIViewController,UIImagePickerControllerDelegate, UINavigationControllerDelegate {

var instanceOfCustomObject: dummyClass = dummyClass()   //While initialising instanceOfCustomObject, the above said error comes.

PS:还添加了用于集成Objective-C代码和Swift代码的桥接头。

任何帮助解决上述问题都非常感谢。谢谢!

0 个答案:

没有答案