10dfvdsfv

Page 62

FEATURE

(If the text inside the label crops, increase the width of the label by dragging the edges.)

More advanced Swift 4 methods We’ve made a simple app. Now let’s move on to some methods and code snippets you can use in your own app projects.

Printing ‘Hello World’ in Swift print(“Hello, world!”)

Deining Variables Use ‘let’ to make a constant and ‘var’ to deine a variable. The value of a constant cannot be changed

62 Macworld • April 2018


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.