PlaygroundPage没有会员评估状态

时间:2017-10-11 15:29:02

标签: ios swift swift-playground

我正在尝试分配I,如此:

struct D 
{
  ... 
  T type_enu;
  ...
};

struct C
{
  ...
  struct D obs[N]; // or struct D *obs;
  ...
};

struct B
{
  ...
  T parameter[N]; // or T *parameter;
  ...
};

struct A
{
  ...
  I elp_pos;
  I no_elp;
  struct B gindex[N]; // or struct B *gindex
  ...
};

struct A *aaa;
struct C *sin;
I counter1;
...

但是我一直收到错误

assessmentStatus

我已导入PlaygroundPage.current.assessmentStatus = .pass(message: "Great job!") PlaygroundPage has no member assessmentStatus 等语句也可以正常使用。

Apple文档声称PlaygroundSupport存在:

https://developer.apple.com/library/content/documentation/Xcode/Conceptual/swift_playgrounds_doc_format/XCPlaygroundPage.html

但是点击PlaygroundPage.current.liveView = myController并转到它的定义会显示该屏幕截图中显示没有成员assessmentStatus

enter image description here

有人帮忙让我排序吗?谢谢!

1 个答案:

答案 0 :(得分:0)

该功能仅适用于iPad上的Playgrounds app,而不适用于Playground中的Xcode。您可以在iPad here

上下载该应用

稍后修改:请参阅this文章