I try to run some UIKit playground examples and I have problem viewing the graphic results.
What works:
- I can preview any string assignments in the grey right editor pane.
- I can click on the 'eye' (quick preview) or 'small rect' icons and see correct UIKit result albeit in a temporary popup or in a pane between the code lines (both smaller).
- I can print stuff and it shows in the pane below the editors (below the bar with timeline and start/stop button).
What does not work:
- I can't get large graphical display of my code results to display.
Below is some sample code I try to use:
import UIKit
import PlaygroundSupport
let containerView = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 375.0, height: 667.0))
let circle = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 50.0, height: 50.0))
circle.center = containerView.center
circle.layer.cornerRadius = 25.0
let button = UIButton(type: .detailDisclosure)
containerView.addSubview(button)
let startingColor = UIColor(red: (253.0/255.0), green: (159.0/255.0), blue: (47.0/255.0), alpha: 1.0)
circle.backgroundColor = startingColor
containerView.addSubview(circle);
PlaygroundPage.current.liveView = containerView
Is there anything more I should do run the playground? There's a related question: Playground not showing results where OP is asked if he set the device in the simulator. Well, in my case I didn't but I don't know where to do it. The simulator is not running.
EDIT:
I've seen the question marked as possible duplicate with accepted answer not working for me and the other one mentioning partial solution (only quick and inline previews). So to rephrase my question: In Xcode 8.2 should I expect to see UIView related results anywhere else than in quick preview (popup) and inline preview (between lines of code)?