gpt4 book ai didi

objective-c - 在应用程序中嵌入 Xcode Playground

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

我想制作一个 Cocoa OS X 应用程序,用户可以在我的应用程序的一个窗口中输入和执行 Swift 语言代码。我的第一个想法是自己做一个基本的IDE,用系统调用来进行编译和执行;但是,我真的很想拥有交互式 Playground 功能。

我做了研究,发现我可以创建带有嵌入式文档的 Xcode Playground 文件,但这引发了一个问题:

Does the documentation have to be placed above and below the playground, or can I embed a Playground within a container in my HTML code?

我所说的 Xcode Playground 嵌入式文档 can be found here .

基本上,我希望以模仿 CodeAcademy.com 上使用的布局的方式嵌入 Playground

enter image description here

这是否可以通过嵌入 Xcode Playgrounds 的文档实现,或者我必须在我的 Cocoa 应用程序中从头开始重新创建一个 IDE?

最佳答案

根据 Apple 的 Interactive Learning Document Format Reference , playground 的 sections 元素只能包含散布的 codedocumentation 元素的平面列表,也就是说 它们必须在写作时是内联的

但是,您会注意到指南顶部的一条消息,

Warning: This is a specification that is likely to change.

结论:没有,但是file a feature request .

关于objective-c - 在应用程序中嵌入 Xcode Playground,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28315167/

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