Stuck with importing and using Swift ViewController for Objective C class?

I am stuck in a strange situation. I have a ViewController written in Swift . It is basically an inline ViewController screen.

Now I want to use it in Obj-C Code . But I can't fail with the "Use undeclared indentifier" error whenever I ever try to create an object of it.

Below are the breakpoints I've already followed:

  • import "homer_iOS-Swift.h" in my ViewController where homer_iOS is my project (homer_iOS is my target / project name).

    target name.

  • Cross-checked BuildSetting> Define Module to Yes for targets and project.

  • Cross-check the interface string header BuildSetting> Objective C>
     homer_iOS-Swift.h

  • @objc in front of my Swift ViewController class.

Please don't just mark it as duplicate and continue as suggestions for the same question types have already been tried. Any help would be appreciated.enter image description here

+3


source to share





All Articles