在Swift Playgrounds中链接页面[Xcode] [英] Linking pages in Swift Playgrounds [Xcode]

查看:197
本文介绍了在Swift Playgrounds中链接页面[Xcode]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是快速运动场的新手,在Xcode中创建快速运动场时遇到了一些问题.

I am new to swift playgrounds and ran into some problems while making a swift playground in Xcode.

这是我的主要游乐场页面

This is my main Playground page

import UIKit
import PlaygroundSupport
import SpriteKit
let secondScene = Index()
let master = FirstScene()
let root = UINavigationController(rootViewController: master)
PlaygroundPage.current.liveView = root

但是当我尝试在Swift的源类和Playground页面本身中添加下一个主题"时,链接不会出现.

But when I tried adding Next Topic in both the source class in Swift and the playground page itself the link does not appear.

注意:我在Xcode中使用Swift Playgrounds,而不是在iPad上使用Playgroundbook.

NOTE: I am using Swift Playgrounds in Xcode not a Playgroundbook on an iPad.

此外,在主页的sources文件夹中,我将所有class es声明为public,这是在源代码中使用帮助程序swift文件的正确方法吗?

Also, inside sources folder of my main page I declared all classes as public, is that the right way to use the helper swift files in source?

我尝试创建一个新的游乐场,并添加了具有默认链接但仍无输出的页面.

I tried creating a new playground and added pages which have default links but still no output.

推荐答案

阅读Apple的要创建指向另一个页面的链接,您将执行与在Markdown中创建指向该引用的链接相同的操作:

To create a link to another page you will do the same thing that I did above to create a link to that reference in Markdown:

[Next Topic](Pretend%20Topic%20Name)

您实际上也可以执行以下操作:

You can actually do something like this as well:

[Next Topic](@next)

这篇关于在Swift Playgrounds中链接页面[Xcode]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆