Difference between == and === in Swift
== - Compares the value of the variable
=== - Along with value the data type also need to be matched.

seen from United States
seen from United States

seen from T1

seen from Slovenia
seen from Fiji
seen from Russia
seen from Türkiye
seen from United States
seen from Malaysia

seen from United States
seen from Brazil

seen from Slovenia
seen from Indonesia
seen from United States
seen from Germany
seen from Germany
seen from United States
seen from Slovenia

seen from Malaysia

seen from Malaysia
Difference between == and === in Swift
== - Compares the value of the variable
=== - Along with value the data type also need to be matched.
Protocols in Swift
What is a Protocol?
In swift protocol is considered as a major property which we use frequently.
It basically means what are the things we are necessary to be handled. It is considered as a set of rules which are mandatory to define on using the protocol
Ex: consider a Vehicle
If we need to buy a car what are the things we take care first (speed, milage, kms) so these are the necessary things that everyone needs to know.
So, we declare all of them in a protocol
Any vehicle need to satisfy these properties(car/bus/plane)
Structure of Protocol:
Here every protocol have mandatory rules soo
Any class which conforms to this protocol need to provide definition for this.
In simple words for people who knows Java Programming Language
Protocol is just like an interface in Java
Any class which implements that interface need to provide definition.
API INTEGRATION IN SWIFT(part 1)
API means Application Programming Interface
It's main purpose is to bring applications together in order to perform a designed function.
It helps us to make repetitive yet complex processes highly reusable with a little bit if code.
Overview of API
Via theory wise first in order to get the data from API we need to send a request.
So, we prepare a request object.
A Request object contains
• URL
• Header Parameters
• Body Data
In code wise we need to follow several steps to achieve that task of getting the data via API
So theory wise get to know these things.
We will continue this in the next part🤗
Happy learning!!
Main purpose of Swift
• It is a powerful and intuitive programming language built using a modern approach for iOS.
• It ensures safety, performance and software design patterns.
• The syntax is concise yet expressive.
• The modern features included in it makes developers love it!!
Methods in Swift
What is a method in swift?
Methods are considered as small piece of code that is reusable. They belong to the classes, enums, structs.
Methods use func as a keyword to provide a definition
Structure of method:
These methods are placed inside the class, struct Or enum.
Swift allows classes to have methods with the same name but there need to be a difference either in
Number of parameters
Datatype of parameters
Order of parameters
Name of parameters
Methods can have a return type as well. Usually that return type is placed at end of the method.
IOS App Development by @hrsoftbd
IOS App Development by @hrsoftbd
Best iOS App Development Training in Noida helps aspiring developers gain hands-on expertise in Swift, Xcode, UI design, API integration, debugging, and live project development.
For Info
Website - https://next2help.com/
Contact Us::(+91) 9319690952
Mail: [email protected]
Address: B-135, Block B, Sector 2, Noida, UP