Posts from Swift

How to print backslash “\” in Swift

By Saruque Ahamed Mollick

It’s hard to print a backslash “\” in Swift if you don’t know how to escape from that character. Look at the below code: print("\") It will throw an error: .... Read More

How to concatenate strings in Swift

By Saruque Ahamed Mollick

In this tutorial, we will learn how to concatenate strings in Swift. We can concatenate or merge two or multiple strings in Swift easily with the following methods. I have worked i.... Read More

solution: Image Literal is not working anymore in Xcode

By Saruque Ahamed Mollick

I am pretty much sure that you have reached this page because you are not able to see the Image Literal option anymore in Xcode Swift. I will give you the best alternative way to a.... Read More

How to change Xcode Editor font size in Xcode 13 and Higher versions

By Saruque Ahamed Mollick

There are multiple ways to change the Xcode Editor font size. In this tutorial, I will show you the easiest way to make it possible in the first place. We need to change the code e.... Read More

Return multiple values from a function in Swift

By Faruque Ahamed Mollick

You can return multiple values from a function in Swift programming. But not in a generous way. It is a bit tricky to perform this task. In order to return multiple values from a S.... Read More

Get common elements between two arrays in Swift

Get common elements between two arrays in Swift

By Faruque Ahamed Mollick | July 3, 2022

After this Swift tutorial, you will be able to learn how to get common elements from two different arrays. Finding common items between two arrays is quite an easy task. Let’s see the code below: let homeDevices = ["Macbook", "Doorbell", "Smartphone", "TV", "Refrigerator"] let officeDevices = ["Air Conditioner", "Macbook", "Mouse", "Refrigerator", "CPU"] // Create new [&h Read More

Parsing a JSON Array in Swift

By Aryan

JavaScript Object Notation, or JSON, is a text-based data format that is used to store and transfer data across web and local networks. JSON is the most popular data format used in.... Read More

Tuples in Swift

By Aryan

In Swift, Tuples are another form of collection data type, that can store more than one value of different or same types. What makes Tuples unique from Arrays is that Tuples can st.... Read More

Related Posts