迅速進口聲明不再需要[重復]

[英]Swift Import Statements No Longer Necessary [duplicate]


This question already has an answer here:

這個問題在這里已有答案:

With the latest update to Swift, I'm able to use classes, functions, etc. from Foundation and UIKit without having to include the import statements for them. If I add the import statement in Xcode, it shows it crossed out, as if it's depreciated.

通過Swift的最新更新,我可以使用Foundation和UIKit的類,函數等,而無需為它們包含import語句。如果我在Xcode中添加import語句,它會顯示它被划掉,好像它被折舊了。

Is it no longer necessary to include import statements for some modules like Foundation and UIKit in Swift?

是否不再需要在Swift中包含某些模塊(如Foundation和UIKit)的import語句?

1 个解决方案

#1


2  

This appears to be a bug in Xcode 7.3.0. As you said, if you continue to import it, there shouldn't be Amy problems. My guess is that we will see an update in the coming days or weeks to fix some of the bugs. Apple is getting ready to release Xcode 8 with Swift 3 in June and are getting the program ready for the switchover.

這似乎是Xcode 7.3.0中的一個錯誤。如你所說,如果你繼續導入它,不應該有艾米問題。我的猜測是,我們會在未來幾天或幾周內看到更新以修復一些錯誤。 Apple正准備在6月份發布帶有Swift 3的Xcode 8,並准備好進行切換。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2016/04/03/729a6b338225ed2388360dcdb05b0dc5.html



 
粤ICP备14056181号  © 2014-2020 ITdaan.com