- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Nitin Aggarwal has Published 156 Articles
Nitin Aggarwal
942 Views
In Swift, an optional escaping closure parameter is a closure that can be executed after the function it is passed to has returned. In this article, we will see how to create escaping closures as parameters with examples. To declare an optional escaping closure parameter, you add the @escaping keyword ... Read More
Nitin Aggarwal
2K+ Views
In Swift, there are many approaches to converting an integer to time components like hours, minutes, and seconds. Every approach depends on the requirement. For example, you can use arithmetic operators to convert. Another approach is using DateComponentsFormatter class to convert an integer into time components easily. In this article, ... Read More
Nitin Aggarwal
3K+ Views
In Swift, the do-try-catch statement is used to handle errors that can be thrown by a function or method. It provides a structured way to catch and handle errors in your code. In your codebase, you cannot handle all runtime errors when they come but using try-catch you can handle ... Read More
Nitin Aggarwal
989 Views
In Swift, you can use KVO to observe changes to an object property by registering an observer for that property. When the property value changes, the observer is notified and can take appropriate actions. In this article, you will see an example of how to implement KVO in Swift. To ... Read More
Nitin Aggarwal
2K+ Views
In Swift, there are several ways to save local data in an app, depending on the type and size of data you want to save. You can use User Defaults, Property List Serialization, Core Data, etc. In this article, you will learn about User Defaults with some examples. User Defaults ... Read More
Nitin Aggarwal
992 Views
In iOS Swift, you can manually deprecate members (properties, methods, and other members) by using the @available attribute with the deprecated argument. @available The @available attribute in Swift is used to specify the availability of a particular piece of code. It can be used to mark a class, function, method, ... Read More
Nitin Aggarwal
2K+ Views
In Swift, there are several ways to create an empty array. All approaches are very easy to create an array. Manytimes, creating an empty array is most common requirement in your apps. You can create empty array of any type. In this article, you will see different ways to construct ... Read More
Nitin Aggarwal
2K+ Views
In Swift, you can use the UITapGestureRecognizer class to add a tap gesture on view programmatically. This class provides you with different properties and methods to enable a tap gesture. In this article, you will learn how to add a tap gesture with an example. UITapGestureRecognizer class UITapGestureRecognizer is a ... Read More
Nitin Aggarwal
1K+ Views
In Swift, underscores have many different uses for a different purposes. Here are some examples. Ignore unnecessary loop variables or return values. Absence of identifiers for external parameters in function calls. Even if they were initially specified as constants, making variables changeable. Ignoring tuple components or using discard values ... Read More
Nitin Aggarwal
572 Views
In Swift, we can use the map() method to the dictionary to apply a transformation to the values of the dictionary. This method returns a newly created object with the same keys as the original dictionary but with the values transformed by the mapping function. Example 1: Transforming Values with ... Read More