<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Swift4 on Roger Molas</title>
    <link>http://blog.rogermolas.com/tags/swift4/</link>
    <description>Recent content in Swift4 on Roger Molas</description>
    <generator>Hugo -- gohugo.io</generator>
    <managingEditor>contact@rogermolas.com (Roger Molas)</managingEditor>
    <webMaster>contact@rogermolas.com (Roger Molas)</webMaster>
    <copyright>(c) 2017 - 2018 Roger Molas -- All rights reserved.</copyright>
    <lastBuildDate>Mon, 12 Feb 2018 14:29:02 +0800</lastBuildDate>
    
	<atom:link href="http://blog.rogermolas.com/tags/swift4/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Generate MapView Snapshot with Snapshotter</title>
      <link>http://blog.rogermolas.com/posts/mapkit-generate-image-snapshotter/</link>
      <pubDate>Mon, 12 Feb 2018 14:29:02 +0800</pubDate>
      <author>contact@rogermolas.com (Roger Molas)</author>
      <guid>http://blog.rogermolas.com/posts/mapkit-generate-image-snapshotter/</guid>
      <description>MKMapSnapshotter is use in creating an image representation of a map view. Previously, other developers use UIGraphicsContext, but now images can reliably be created for any particular region and perspective.
Creating a Map View Snapshot let mapSnapshotOptions = MKMapSnapshotOptions() mapSnapshotOptions.region = mapView.region mapSnapshotOptions.scale = UIScreen.main.scale mapSnapshotOptions.size = mapView.frame.size mapSnapshotOptions.showsBuildings = true mapSnapshotOptions.showsPointsOfInterest = true let snapShotter = MKMapSnapshotter(options: mapSnapshotOptions) snapShotter.start { (snap, error) in let image = snap?.image imageView.image = image }  According to Apple&amp;rsquo;s MKMapSnapshot doc</description>
    </item>
    
    <item>
      <title>Multiline String Literals</title>
      <link>http://blog.rogermolas.com/posts/multiline-string-literals/</link>
      <pubDate>Sat, 01 Jul 2017 14:07:14 +0000</pubDate>
      <author>contact@rogermolas.com (Roger Molas)</author>
      <guid>http://blog.rogermolas.com/posts/multiline-string-literals/</guid>
      <description>Long strings are strings delimited by &amp;quot;&amp;quot;&amp;quot;triple quotes&amp;quot;&amp;quot;&amp;quot; that can contain newlines and individual &amp;ldquo; characters without the need to escape them. SE-0168 Multi-Line String Literals
Multi-Line String Literal Creation let lines = &amp;quot;&amp;quot;&amp;quot; This is line one This is line two This is line three &amp;quot;&amp;quot;&amp;quot; print(&amp;quot;Multi-Line String: \(lines)&amp;quot;)  Mutation let myString = &amp;quot;&amp;quot;&amp;quot; Hello Multi line string! This is sample of mutating string. End here &amp;quot;&amp;quot;&amp;quot; let startingIndex = myString.</description>
    </item>
    
  </channel>
</rss>