0

Hy guys,

Do you know how can I create a module(namespace) in swift ? For example in C# we have namespace keyword, but in Objective-C there is no such thing, there we named our classes with the prefix of the folder they were located in. Shall I use the same approach in swift or do you know some other way to achieve namespacing in swift.

Thank you!

Horatiu
  • 151
  • 2
  • 12

2 Answers2

1

You can achieve it by using Frameworks which is newly introduced in iOS 8 for namespace-ing, if I am not mistaken.

Ryne Cheow
  • 667
  • 2
  • 8
  • 13
0

I think I will either rename my classes to have a prefix of two capital letters like NSString, UIView and other classes from Objective-C do or I will wrap them in structs.

Thank you for your comments.

Horatiu
  • 151
  • 2
  • 12