- 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
2K+ Views
You can use the Timer class in Swift to create a timer that can execute a method repeatedly at a specified time interval. You can implement the timer to solve different problems. You can schedule repeatable and non-repeatable timers in Swift. Timers in Swift can be used to perform a ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
966 Views
In Swift, you can make a weak protocol reference by using the weak keyword when declaring the variable or property that holds the reference to the protocol. The weak reference helps you to avoid the retain cycle creation. What is a weak protocol reference? A weak protocol reference in Swift ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
198 Views
In Swift, you can define a base class using the class keyword. The base class can be used to implement common properties using a single class. You can define the properties and methods in a class like the one below − class MyBaseClass { // properties and ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
2K+ Views
In this article, you will learn various ways to generate random alphanumeric strings in the Swift language. Here we are going to use the following 3 methods to generate a random alphanumeric string in swift − Using the RandomNumberGenerator protocol Using the Random() function Using higher-order functions Using ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
1K+ Views
A floating point number represents a value with a decimal point. In Swift, there are two types of floating point numbers i.e. Float and Double. They both are very similar with some unique use cases. Float They represent 32-bit decimal numbers in the Swift language. When you want to store ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
205 Views
In Swift, there are two different concepts i.e. protocols and superclasses are used to build the application by writing reusable and flexible code. They both are different concepts but somehow they have some common features. You can define the protocol with methods and properties to achieve any particular feature. In ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
1K+ Views
In this article, you will learn about how to create a button prograticamtilly in the Swift language. There are different ways to create a button object programmatically in iOS. Let's explore some of them with an example. We will see the following ways to create a button − Step 1 ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
5K+ Views
In Swift, you can use the layer property of a UIButton to set the corner radius of its border. You can use the layer (CALayer) property to apply the border width and color to the button. Also, the same property provides access to the cornerRadius property to make the button ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
6K+ Views
To change the text of a UIButton in Swift, you can use the setTitle() method of the button. This method takes an argument to set the button title for a particular state. Generally, we used the normal button state. We will change the text of the button programmatically by following ... Read More
![Nitin Aggarwal](https://www.tutorialspoint.com/assets/profiles/558477/profile/60_3034393-1669108333.jpg)
Nitin Aggarwal
4K+ Views
This article explains how to go back from a view controller programmatically using Swift language. You will see an example of using the popViewController method to go back to the previous controller. What is ViewController in Swift? In Swift, a UIViewController manages the interaction between the user interface and the ... Read More