Archives for;

Basic Functions

Setting up backgrounds for UIView

There are different ways of setting up backgrounds in Swift, depending on the object, method, background type etc. We will go through some of these here. Setting up a background image for a UIView: Replace “myImage.png” with the name of your image. Note: Make sure you add your images to the Bundle first. To […]

Creating a function

To create a basic function: Then you call it with: This would print a message “Just created my first function!” in the console. To create a function with parameters: This function will take 2 parameters – ‘a’ and ‘b’ and then return the Sum of both as an Integer value. The way […]