iOS Development #10: If & Else Conditionals iOS Development #10: If & Else Conditionals

iOS Development #10: If & Else Conditionals

A conditional is the ability to determine an outcome based on a given condition. We are used to making decisions based on certain conditions. For example, if we feel great, we’ll go for a walk, if we feel bad, we’ll stay in the bed. Conditional is a powerful programming feature...

Jan Zavrel
Jan Zavrel July 12, 2021
iOS Development #9: Custom Types iOS Development #9: Custom Types

iOS Development #9: Custom Types

If you’ve followed me so far, you should have three variables in your program, that hold your age, year of birth and name. Let’s say I want to store this information about my daughter Julie as well. I could store three new values in three new variables named ageOfJulie, yearOfBirthOfJulie,...

Jan Zavrel
Jan Zavrel June 28, 2021
iOS Development #8: Strings iOS Development #8: Strings

iOS Development #8: Strings

String is another important and useful data type. It’s also a struct like Int but String gives us much more functionality. Strings are always wrapped with quotes, preferably double quotes ("..."). Since String is actually a group of individual characters, we can count those characters. Let’s say I want to...

Jan Zavrel
Jan Zavrel June 27, 2021
iOS Development #7: Type Annotation & Inference iOS Development #7: Type Annotation & Inference

iOS Development #7: Type Annotation & Inference

Type Annotation You are already familiar with type annotation which begins with a colon : and ends with a specific type Int. Type annotation specifies the type of a variable explicitly and tells the computer that the variable can hold only values of the specific type. In our case, when...

Jan Zavrel
Jan Zavrel June 26, 2021
iOS Development #6: Structs iOS Development #6: Structs

iOS Development #6: Structs

In some languages, an integer number is regarded as a primitive data type. In Swift, it’s a composite data type called struct (a shortcut for a structure). When you look for the Int declaration in the Swift language documentation, you’ll see this: @frozen struct Int The struct keyword confirms what...

Jan Zavrel
Jan Zavrel June 25, 2021
iOS Development #5: Numbers iOS Development #5: Numbers

iOS Development #5: Numbers

In the previous chapter, we shortly discussed some basic data types, namely numbers, text (string), and logical values (boolean). Let’s take a look at numbers in more details now. Whole numbers Int (which we used to declare the age variable) stands for integer. This data type is used to store...

Jan Zavrel
Jan Zavrel June 24, 2021
iOS Development #4: Variables iOS Development #4: Variables

iOS Development #4: Variables

Unlike our simple program that’s only able to print bunch of text to the console (in case it’s not all commented out), real programs need to produce some output based on the input they get from the user. This user input, typically some data, has to be stored somewhere in...

Jan Zavrel
Jan Zavrel June 23, 2021
iOS Development #3: Comments iOS Development #3: Comments

iOS Development #3: Comments

Believe me when I say that your own code can become difficult to understand even after only a few hours later. Especially when you don’t follow the correct naming convention which I explain later, you can wonder for hours what your older self meant by this or that code. That’s...

Jan Zavrel
Jan Zavrel June 22, 2021
iOS Development #2: Swift Playgrounds iOS Development #2: Swift Playgrounds

iOS Development #2: Swift Playgrounds

Let’s start with the fundamentals of Swift programming language. To run Swift, you need to download either Xcode or Swift Playgrounds, both available for free on Mac App Store. Since Xcode is a really heavy full-blown development environment, we will start with considerably less demanding Swift Playgrounds. Go ahead and...

Jan Zavrel
Jan Zavrel June 22, 2021
iOS Development #1: Introduction iOS Development #1: Introduction

iOS Development #1: Introduction

Welcome to the series of articles where I will introduce you step by step into the wonderful and exciting world of iOS development. We’ll start with fundamentals of Swift programming language; next you’ll get familiar with Swift Playgrounds and Xcode development environment and you’ll learn how to design applications with...

Jan Zavrel
Jan Zavrel June 21, 2021

TWDC

FRONTEND FROM SCRATCH