Ashok Natarajan
Ashok Natarajan

Reputation: 31

Is that possible to import a Swift file from another Swift file

Here i am with big trouble to access the method from class a to class b.

I have tried using import class a commends but no luck! also setting up with the Swift complier- Search path.

No luck Spend lots number of hours on this issues, so can some one please let me know whether the import package is feasible with swift or not!

Thanks Ashok Natarajan

Upvotes: 0

Views: 1906

Answers (1)

ABC
ABC

Reputation: 41

You should be able to simply "use" the class as there is no need to "import it" in any way.

Things that can cause this

  1. Is the file where you define the class accessible to your target?
  2. Is the file where you define the class have a .swift extension?

Upvotes: 1

Related Questions