gpt4 book ai didi

ios - 使用 swift 创建 iOS 框架

转载 作者:可可西里 更新时间:2023-11-01 01:00:11 25 4
gpt4 key购买 nike

我正在尝试使用 swift 创建一个 iOS 框架。我关注这个blog还有其他一些,但输出不是我想要的方式。

下面是我的原始源文件

public class TestClass: NSObject {

// publicVar description
public var publicVar: Int = 0

// doSomething description
public func doSomething() {
print("doSomething method")
}
}

将框架添加到我的项目后,它创建了一个 TestFramwork-Swift.h

enter image description here enter image description here

You can see it's not contain my description. I want the framework header files like Apple.

enter image description here

谁能帮我解决这个问题。我不明白我哪里做错了。我也无法将更多 swift 文件添加到我的框架中。

最佳答案

对于要在框架标题中显示的注释,只需使用三重斜杠而不是双斜杠。

关于ios - 使用 swift 创建 iOS 框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35266002/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com