加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

如何在Swift中创建可导入模块?

发布时间:2020-12-14 06:12:06 所属栏目:百科 来源:网络整理
导读:我已经阅读了通过苹果的文档Swift和没有找到任何关于如何创建模块或如何定义类或结构成员为私有或公共。 在语法中有对import语句的引用,但我可以找不到它做什么或如何使用它的信息。 有谁知道我在哪里可以找到这个? 最新的Xcode 6 beta更新(beta 4)带来访
我已经阅读了通过苹果的文档Swift和没有找到任何关于如何创建模块或如何定义类或结构成员为私有或公共。

在语法中有对import语句的引用,但我可以找不到它做什么或如何使用它的信息。

有谁知道我在哪里可以找到这个?

最新的Xcode 6 beta更新(beta 4)带来访问控制swift

Swift Enables Access Control

Swift access control has three access levels:

  • private entities can only be accessed from within the source file where they are defined.
  • internal entities can be accessed anywhere within the target where they are defined.!
  • public entities can be accessed from anywhere within the target and from any other context that imports the current target’s module.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读