There is no need to think about this issue. Because all Swift files are global and can be called without import. Just drop it directly, no need to import
Actually, I don’t understand it too well In the same namespace, you can directly reference it without import
When I was in OC, there was a PrefixHeader that specifically imported a class and was universal But Swift doesn’t have this thing. I know it can be implemented using bridging
I installed several common libraries in pod I found that SDWebImage only needs to be imported once, and all classes can be used But other libraries still seem to need to be imported every time
To import a swift file into OC, don’t you need a bridge file? Just write the import in the bridge file. All other swift files in the entire program can be used directly. That’s how swift is.
That would be great. Similarly, you can look at Java, Python, etc., and you can also explicitly indicate which packages you use in this file. import 的地方 import
Of course, if you are worried that using
multiple times will cause the app size to increase, then you are worrying too much. import
You can create a swift file in the project to import external files. There is no need to import elsewhere.
There is no need to think about this issue. Because all Swift files are global and can be called without import. Just drop it directly, no need to import
Actually, I don’t understand it too well
In the same namespace, you can directly reference it without import
When I was in OC, there was a PrefixHeader that specifically imported a class and was universal
But Swift doesn’t have this thing. I know it can be implemented using bridging
I installed several common libraries in pod
I found that SDWebImage only needs to be imported once, and all classes can be used
But other libraries still seem to need to be imported every time
Sit and wait downstairs
To import a swift file into OC, don’t you need a bridge file? Just write the import in the bridge file. All other swift files in the entire program can be used directly. That’s how swift is.
That would be great. Similarly, you can look at Java, Python, etc., and you can also explicitly indicate which packages you use in this file.
Of course, if you are worried that usingimport
的地方import
multiple times will cause the app size to increase, then you are worrying too much.
import