Same class extension in two different modules

I have a framework in my project that implements an extension in NSDate. The extension is as follows.

extension NSDate {
   func isGreaterThanDate(otherDate: NSDate) -> Bool {
      //function implementation here
   }
}

I have imported this infrastructure into the application project. Now, if I copy and paste the same extension into a fast file in the application, a new copy in my application code will override the copy in the framework code.

When I call this function in my application, is there a way I can use the namespace to indicate which implementation I want?

+3
source share
1 answer

, : ", ". , , - ​​ , .

0

Source: https://habr.com/ru/post/1685329/


All Articles