- Trending Categories
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](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
727 Views
In Swift, you can use the weak keyword to declare an array of weak objects. In this article, we will use the weak keyword to store the weak objects or references in an array. Weak References Weak references are one of the solutions to the retain cycle problem in Swift. ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
171 Views
In Swift, there are some directives to perform some checks at compilation time. Based on that, you can perform initial checks to write better code. In this article, we will see how to use the "#warning" directive with some examples. You can use the #warning directive to issue a warning ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
585 Views
In Swift, you can easily call a method along with parameters on the main thread through GCD. You can use the DispatchQueue.main.async method to execute a method on the main thread. Let's learn how to achieve this in Swift. Also, you can call a method with parameters after a delay ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
4K+ Views
In Swift, you can remove subviews of a view by using a loop to iterate through each subview. Swift provides a method called removeFromSuperview() to remove a view from its superview. In this article, you will learn how to use this method with some examples. removeFromSuperview() This method belongs to ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
4K+ Views
In Swift, there is a framework called AVFoundation that provides flexibility to play audio files. This framework provides you with a class called AVAudioPlayer to manage audio play and pause. In this article, you will learn how to play a sound using the AVAudioPlayer class in Swift. AVFoundation This framework ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
6K+ Views
In Swift, you can use the UIDevice class to get a unique device ID. In this article, you will learn how to get a unique device ID using the identifierForVendor property in Swift. What is the UIDevice Class? Swift's UIDevice class gives access to device information like as name, model, ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
2K+ Views
In Swift, there is the Date class to work with all kinds of date formats. You can manipulate and format date objects using the Date class. There are other supported classes like DateComponents, DateFormatter, etc that help you format date objects from one type to another type. Let's learn about ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
2K+ Views
In Swift, you can use the "+" operator and join function to join the strings. You can concatenate multiple strings using this operator. In this article, we will see some examples of how to concatenate the strings. Here are several examples of using the operator and in-built functions. Algorithm ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
575 Views
In Swift, you can use the DateFormatter class to convert a string date to a date object. This class provides date conversion properties and methods. In this article, we will see some examples of date conversions. DateFormatter Class Swift's standard library has a class that is used to convert dates. ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
780 Views
In Swift, the equivalent of the Objective-C method respondsToSelector is the responds property of the NSObject class. To check if an object responds to a particular selector, you can use the responds(to:) method which is declared in the NSObjectProtocol. Here's the syntax − if objectName.responds(to: #selector(methodName)) { ... Read More