Tutorial details

Swift Variables | App Code for Sale | Preview

Swift Variables | iOS Tutorial

In this tutorial i will be showing you how to understand and use variables in swift playground. Features: Swift Playground

Overview PAGE TOP

In this tutorial i will be showing you how to understand and use variables in swift playground.

Features:

  • Swift Playground

The Swift playground is a useful new addition to xcode where you can test and play around with code and break it down to see how it works.

Playground PAGE TOP

var name = "Aaron"
var Gender = "Male"
var Colour = "Green"
var Food = "Burgers"


var AddValues = "\(name) likes to eat \(Food)"


var AddValues2 = "\(Colour) is \(name)'s Favourite Colour'"


var AddValues3 = "\(name) is a \(Gender) who likes to eat \(Food) and likes the colour \(Colour)"


var Score = 1000
var Times = 10
var divide = 5
var add = 200
var minus = 50


var FinalScore = "Final Score: \(Score)"


var FinalScore2 = "Final Score: \(Score - minus)"


var FinalScore3 = "Final Score: \(Score * Times)"


var FinalScore4 = "Final Score: \(Score / divide)"


var FinalScore5 = "Final Score: \(Score - minus)"

Reference PAGE TOP

http://www.geekylemon.com/swift-variables

0 Comments Leave a comment

Please login in order to leave a comment.

Newest first
!

Sign-in to your Chupamobile Account.

The Easiest way to Launch your next App or Game.

Join Chupamobile and get instant access to thousands of ready made App and Game Templates.

Creating an account means you’re okay with Chupamobile’s Terms of Service and Privacy Policy.