Xcode Playground Timeline is empty

I am trying to use the timeline assistant editor for a playground in xcode version 7.3.1, it is always empty. Timeline Appointment Editor

I think the error comes from xcode, however from the search it doesn't seem like anyone had the same error, so I got confused.

+4
source share
2 answers

To display the result print, you need to open the "debug area" by going to the menu

View> Debug Area> Show Debug Area

or click the button in the lower left:

enter image description here

enter image description here

To display a timeline graph, you can use XCPCaptureValue:

import XCPlayground

var x = 0
for i in 0...10 {
    x += i
    print(x)
    XCPCaptureValue("Value for x", value: x)   
}

enter image description here

XCPCaptureValue ( ).

, "+" :

enter image description here

, :

enter image description here

+2

, Timeline.

, Xcode 8 Swift 3. , PlaygroundPage.current.liveView:

import UIKit
import PlaygroundSupport 

let contentView = UIView(frame: CGRect(x: 0, y: 0, width: 320.0, height: 600.0))
contentView.backgroundColor = UIColor.white

PlaygroundPage.current.liveView = contentView

- , . PlaygroundPage.current.liveView UIView, UILabel, UITextField ..

, , .backgroundColor UIColor.white, /.

0

Source: https://habr.com/ru/post/1651205/


All Articles