In this part, we will look a very basic approach to a network call in swift. In later parts we will look at advanced and nice way.
In this article we will look at how we could make a network call in swift for fetching the data from backend services.
We will not be using any third party for network calls, instead we will be using apples own api services URLSession.
Also we will be using openweathermap for fetching a json response of weather information.
If You are an iOS Developer , you must take a look here . You will find this article very helpfull .
The time when I was exploring about AVFoundation , for a good examples and documentation , there was literally no such explanations and documentation . There are some but very poorly written .
We are going to understand the AVFoundation and Implement that in an SwiftUI app project . We will follow the MVVM pattern . And Line by Line Understanding of Code .
Below is the repository for this project , just give it a star and…
In this article, we will take a very short look at the implementation of MVVM architecture with an example project.
Source Code: GitHub
Here you will learn about how UI logic is separated from core application logic by taking your first look at the MVVM architecture pattern. MVVM is a widely used design pattern that allows us to separate core application logic from UI logic.
Model: This is your core model, which will contain all data that you may have consumed from a database or via an external API.
ViewModel: A stripped-down or UI-tailored representation of your Model that contains…
This article contains solutions to the few common problems you will face later or early in your carrier 👀 .
If you are an iOS Developer, you are going to face these questions in the future or you may have faced these questions already. Just read this article and implement its usage in your real-world applications 👍🏻
Now let us look at the first question!
Suppose you are working on an application that shows the DATA of the selected date in a calendar. …
Let us handle the API and API calls in any application 🥸
Openweathermap is one of the free api provider for weather information , We will be using their api in this application . You can go through this link to understand the documentation about the APIs .
We will just pass the city name with URL and APIKey to get the weather information .
Before making an api call in our application , let us create a model which stores the information getting from API while decoding it .
Since we need only few informations from…
How to Create An Interactive UI for ToDo App using MVVM Pattern ??
In this article , you will see how to handle MVVM design pattern by creating a working to do application . We will se how we have written code for UI and how we are handling the viewModels and models .
You will be able to download the source code by the below repositry , just give it a star . All the best .
The app we are going to create is named as TaskManager . After watching the above GIF , you may got the…
Swift 5 features | Best 10 features of Swift Programming Language
Let us take a look to some of the best swift features we must know !
In this article , I have covered some basic concepts of Red Black Trees !
In Red-black trees each node is associated with an extra attribute: the color, which is either red or black. To get logarithmic complexity we impose the following restrictions.
Definition: A Red-black tree is a binary search tree that satisfies the following properties:
1. Each tree node is colored either red or black.
2. The root node of the tree is always black.
3. Every path from the root to any of the leaf nodes must have the same number of black nodes.
4. No two…
Some basic things about BITs and its Manipulation
To play with Bits , you must be familiar with binary numbers , and their operations like addition , subtraction etc .
Bitwise NOT is an unary operator that flips the bits of the number i.e., if the ith bit is 0, it will change it to 1 and vice versa. Bitwise NOT is nothing but simply the one’s complement of a number. Lets take an example.
In this article you will see how to solve knapsack problem by memoization .
You have given a bag of capacity ‘W’ . And also you have ’n’ items with ‘w’ weights and ‘v’ values . You need to fill the bag with maximum values without crossing the capacity weight .
In this approach , we will try to find all the possibilities using recursion .
def knapSack(W, wt, val, n): if n == 0 or W == 0 :