Over a million developers have joined DZone.

Playground Power in Swift

Working with playgrounds in Swift? Here's a bunch of articles you won't want to miss.

· Mobile Zone

There’s a new article for your attention up at the official Swift blog, Literals in Playgrounds:


New in Xcode 7.1 is the ability to embed file, image, and color literals into your playground’s code. Literals are the actual values of your data represented in their native format, directly within the Xcode editor. For instance, there’s no need to type “myImage.jpg” in the editor – just drag your image from the Finder and the actual image will appear in-line with your code. Instead of showing RGB values to indicate color, the playground will render a color swatch. Literals in playgrounds behave similarly to code you would otherwise hand-author in regular Swift code, but are rendered in a much more useful manner…

If you’ve been underutilizing those playground thingys so far, Playground Secrets and Power Tips is literally a great way to get up to speed, and it's literally up to the minute

cover-216x300.jpg


So what’s new in this edition? I’ve done a back to front update to incorporate all the new XCPlayground features in Xcode 7.1 beta 3: the new liveView feature that can be used with views and view controllers (and the XCPlaygroundLiveViewable protocol that supports rendering arbitrary model objects), the new ways to continue execution and capture values, etc.

Also, you’ve probably noticed the move to Markdown this year for playground documentation and Swift Documentation, but now there’s full documentation over at the mothership:


Use markup formatting commands to create rich comments in playgrounds and to document your Swift symbols for Xcode quick help. Commands include page level formatting for headers and other elements, inline formatting, and images. Playground formatting commands enable page navigation as shown in the following figure … Swift symbol documentation adds descriptions to symbol completion and quick help for symbols …

So if you’re using those legacy HeaderDoc conventions, why there’s all you need to level up!

And to finish up, perhaps a potpourri of playground posts of particular perspicuity:

Topics:
ios ,swift ,playground

Published at DZone with permission of Alex Curylo, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}