Open in app
Home
Notifications
Lists
Stories

Write
Harshvardhan Arora
Harshvardhan Arora

Home

About

Published in Dev Genius

·Pinned

Inheritance in Swift

Inheritance allows you to create classes that build upon from other classes. You can write different implementations while maintaining the same behaviours by reusing code you have already written. …

Swift

6 min read

Inheritance in Swift
Inheritance in Swift

Published in Dev Genius

·Pinned

Subscripts in Swift

How do you access an element of an array? let element = array[5] The above property element is set to the sixth element from the array. But what does the “[5]” here mean? We’ve also noticed this in dictionary where we access the value using a key. Is it something…

Swift

5 min read

Subscripts in Swift
Subscripts in Swift

Pinned

Methods in Swift

You’ve learnt about functions, and you’ve learnt about data types like structs, classes and enums. Methods are simply functions that are associated with a type. Similar to properties, we can have instance methods and type methods. The entire playground for these tutorials can be found here! Instance Methods As the word suggests…

Swift

5 min read

Methods in Swift
Methods in Swift

Pinned

Properties in Swift

Properties are simply variables or constants inside a struct, class or enum. We can have stored properties which can hold constants and variables for us. We also have computed properties that do not hold any data but it gets computed when we ask for it. We will also look type…

Swift

9 min read

Properties in Swift
Properties in Swift

Pinned

Structures and Classes in Swift

Structures and Classes make the building blocks of your program. They’re capable of storing data and functionality in the form of constants, variables and functions. This articles covers a broad range of topics from understanding what are structs and classes and why do we need them, how to create them…

Swift

5 min read

Structures and Classes in Swift
Structures and Classes in Swift

May 8

Enumerations in Swift

Enumerations in Swift allow you to group related values under a common type which enables us to write type-safe code. Common Questions — How to create Enums? How to add properties and methods to Enums? How to add custom initialisation for Enums? How to conform Enums to protocols? …

Enumeration

7 min read

Enumerations in Swift
Enumerations in Swift

Apr 13

Closures in Swift

Closures are a block of code that can be passed around as used like other properties in your Swift code. We will look at how to create and use different forms of closures and also understand how they capture values from their surrounding context. Function as a Parameter Consider that you have an array…

Swift

9 min read

Closures in Swift
Closures in Swift

Apr 4

Functions in Swift

Functions are used in every programming language. They are a block of code can perform a particular task, return back values after some computation, and also be passed around as arguments inside other functions. As usual, we will look at different aspects of functions through maximum code and minimum theory…

Swift

6 min read

Functions in Swift
Functions in Swift

Mar 27

Thread Safety with Subjects in RxSwift

On which thread does your RxSwift chain execute its code? How do you perform costly operations without blocking the main thread? What happens if multiple threads try to update your subject at the same time? Let’s dive into answering these questions. You can find the source code for the project…

Swift

5 min read

Thread Safety with Subjects in RxSwift
Thread Safety with Subjects in RxSwift

Mar 22

Control Flow in Swift

Switch statements in Swift are very powerful and will be covered extensively through playgrounds in this tutorial. We will also look at other control flow statements like for-in, while, if, guard, break and continue. As usual, the promise is minimum theory and maximum code. …

Swift

7 min read

Control Flow in Swift
Control Flow in Swift
Harshvardhan Arora

Harshvardhan Arora

Simplifying Swift concepts for You

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable