Xcode 9 – Little Bits of Magic Part Two

Xcode 9 has been filling me with joy everytime I find a spare moment to play with it. Honestly, it is the Xcode I have been waiting for, last year I was not left too impressed by WWDC. However, this year Apple has left me enjoying every second well except when the beta crashes, ha. Anyway, let’s get into another “Little Bits of Magic” and talk about some more features in Xcode 9 that I am enjoying.

Let’s talk about-about writing multi-line Strings now this is more of a Swift 4.0 thing than Xcode 9 but aren’t Xcode and Swift the same thing, don’t answer that I am just stirring. Previously if you wanted to write a multi-line String you have to include “\n” in your code however now you can write them like this.

View Controller

Starting a String with three quotation marks and then end it with another three, you can then make your String have as many breaks as you want and even included quotation marks.

Now if we run this little App on the simulator you can see my line breaks and quotation marks have been incorporated into the text of the label.

Simulator Screen

I love Xcode 9 and Swift 4. Apple has released some great features this year for developers to play with but it’s the small things like this that make me happy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s