Nitin Aggarwal has Published 132 Articles

How to find the index of a list item in Swift?

Nitin Aggarwal

Nitin Aggarwal

Updated on 02-Jan-2023 13:40:14

17K+ Views

Swift gives you some methods to perform on the collection type to get the index of a particular object. To find the index of an item in an array in Swift, you can use the firstIndex(of:) method of the Array type. This method returns the index of the first element ... Read More

How to add constraints programmatically using Swift

Nitin Aggarwal

Nitin Aggarwal

Updated on 02-Jan-2023 12:57:00

13K+ Views

The goal of this article is to explain how you can add constraints programmatically in the Swift language. To programmatically add constraints in Swift, you can use the NSLayoutConstraint class to define the constraints you want to add. Concepts That Will Be Used To Add Constraints Are The Following The ... Read More

How do I get a reference to the app delegate in Swift?

Nitin Aggarwal

Nitin Aggarwal

Updated on 02-Jan-2023 12:39:40

3K+ Views

You should know what an AppDelegate is in Swift before jumping to how to get a reference to it. AppDelegate In an iOS application, the app delegate is the entry point for the application. Throughout the application, this object has been created once by iOS and is accessible in shared ... Read More

What is the difference between Array and NSArray?

Nitin Aggarwal

Nitin Aggarwal

Updated on 21-Dec-2022 16:27:20

3K+ Views

Since Array and NSArray are both core constructs in iOS development, we sometimes forget just how different they are. Here are some major differences between the two constructs that you should know about. Array is a struct, therefore it is a value type in Swift. NSArray is an immutable ... Read More

What is an attribute in Swift?

Nitin Aggarwal

Nitin Aggarwal

Updated on 21-Dec-2022 16:24:40

1K+ Views

Throughout this article, you will learn what an attribute in Swift is and how to use it with code examples. Swift Attributes Swift makes it possible to provide some additional info about the declaration or type. We have two types of attributes that can be used in Swift language. ... Read More

What is a Delegate in Swift?

Nitin Aggarwal

Nitin Aggarwal

Updated on 21-Dec-2022 15:25:33

5K+ Views

In this article, you will learn about what Delegate is and how it works. What is Delegation? As the name implies, delegation gives control to other objects. To make it happen, the delegate object has to be assigned to control other objects. In iOS apps, the UIApplicaitonDelegate is an ... Read More

What are the common execution iOS Application Lifecycle?

Nitin Aggarwal

Nitin Aggarwal

Updated on 21-Dec-2022 15:20:46

2K+ Views

In this article, you will learn about the different execution states of an iOS application. Based on the current state, you can decide what task you want to perform. There are different states that an app might have. The iPhone operating system (iOS) provides us with different five states of ... Read More

How to write a Multiple-Line Comment in Swift?

Nitin Aggarwal

Nitin Aggarwal

Updated on 21-Dec-2022 15:12:25

2K+ Views

In this article, we will discuss Swift's comments, why, and how to use them correctly in Swift. Always keep one thing in mind while writing code i.e. The code must be written for people to read and understand as much as possible. Similarly to the Swift language, comments are very ... Read More

Explain the usage of Classes and the Benefits of Inheritance in Swift

Nitin Aggarwal

Nitin Aggarwal

Updated on 21-Dec-2022 15:04:18

346 Views

Introduction This article will guide you about the usage of Class and what are the benefits of using inheritance in the Swift language. In this article, we will cover the following things − What is a class and what is its usage in Swift? What is inheritance and what ... Read More

Designing patterns used during iOS app development

Nitin Aggarwal

Nitin Aggarwal

Updated on 21-Dec-2022 14:51:22

708 Views

In this tutorial, you will get to know about some common design patterns that you should follow while making iOS apps. What are Swift Design Patterns? In Swift, design patterns make the development process easy for developers. A productive and effective work environment can be created by following the design ... Read More

Advertisements