Tutorial details

Swift Functions | App Code for Sale | Preview

Swift Functions | iOS Tutorial

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

Overview PAGE TOP

In this tutorial i will be showing you how to understand and use Functions 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.

What To Do? PAGE TOP

This tutorial takes place in the Playground.

  1. Open Xcode
  2. Go To File
  3. New Playground Project

Playground PAGE TOP

func Hello(){
println("Hello")
}

Hello()

func HelloTo(name: String){
println("Hello \(name)")
}

HelloTo("Aaron")

func Names() -> (String, String){
return("Aaron", "Steve")
}

Names()

func Calculate() {
let height = 50
let width = 100
let area = height * width
println("Area is \(area)")
}

Calculate()

Reference PAGE TOP

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

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.