XCode6B3: XCPShowView missing from XCPlayground
| Originator: | adam | ||
| Number: | rdar://17603692 | Date Originated: | 09-Jul-2014 05:28 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | |
| Classification: | Other Bug | Reproducible: | Always |
Summary:
XCPShowView function no longer usable in Playgrounds, as it’s missing from the framework
Steps to Reproduce:
Expected Results:
Expected it to be there for use or an explanation of what to use instead
Actual Results:
Error” Use of unresolved identifier
Regression:
Worked fine for Cocoa Playgrounds in beta 2
Notes:
Example playground -
// Playground - noun: a place where people can play
import UIKit
import QuartzCore
import XCPlayground
var bezier = UIBezierPath()
let start = CGPoint(x: 0, y: 0)
let end = CGPoint(x: 100, y: 100)
let stepCount = 4.0
bezier.moveToPoint(start)
let grad = CGPoint(x: end.x - start.x, y: end.y - start.y)
let diff = CGPoint(x: grad.x / stepCount, y: grad.y / stepCount)
for i in 0..<stepCount {
let point = CGPoint(x: i * diff.x, y: i * diff.y)
let control = CGPoint(x: point.x - diff.x * 0.75 , y: point.y + diff.y * 2)
bezier.addQuadCurveToPoint(point, controlPoint:control)
}
bezier
let shapeLayer = CAShapeLayer()
shapeLayer.path = bezier.CGPath
shapeLayer.strokeEnd = 0.1
shapeLayer.lineWidth = 1.0
shapeLayer.strokeColor = UIColor.blueColor().CGColor
shapeLayer.fillColor = UIColor.clearColor().CGColor
let view = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100))
view.layer.addSublayer(shapeLayer)
view
XCPCaptureValue("output", view)
XCPSetExecutionShouldContinueIndefinitely(continueIndefinitely: true)
UIView.animateWithDuration(5.0, delay: 0.0, options: nil, animations: {
view.alpha = 0.0
shapeLayer.strokeEnd = 1.0
}, completion: {(Bool) in})
XCPShowView(view)
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!