Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
iOS Articles
Page 2 of 19
What does "Fatal error: Unexpectedly found nil while unwrapping an Optional value" mean?
This error is very frequent as you can see many times while writing code. Don't worry, you will understand this error in detail in this article. Before jumping to the cause of this error, let's understand what is optional in Swift. Optional Initially, when we receive a value from another source, such as the backend server, it might contain a valid value or nothing at all. In that case, you use optionals that represent a variable with two possible situations: either a value or no value at all. var possibleNumber = "450" var convertedNumber = Int(possibleNumber) In the above ...
Read MoreLoading/Downloading an image from a URL in Swift
In this article, you will learn how you can download an image from a URL in the Swift language. In the iOS application, image downloading from the image URL is the most common task. Apple provides us with a native library to download any data from any URL. There are many third-party libraries available on GitHub to download the images. But in this tutorial, we are not going to use any third-party library. We will use the URLSession class provided by Apple itself. What is the URLSession Class? URLSession is a class in the Foundation framework that provides an API ...
Read MoreHow to find the index of a list item in Swift?
Swift gives you some methods to perform on the collection type to get the index of a particular object. To find the index of an item in an array in Swift, you can use the firstIndex(of:) method of the Array type. This method returns the index of the first element in the array that is equal to the given element or nil if no such element is found. How to print the Index of List items? Let's look at an example. Algorithm Step 1 − Define an input array. Step 2 − Call the firstIndex() method on the input array. ...
Read MoreHow to add constraints programmatically using Swift
The goal of this article is to explain how you can add constraints programmatically in the Swift language. To programmatically add constraints in Swift, you can use the NSLayoutConstraint class to define the constraints you want to add. Concepts That Will Be Used To Add Constraints Are The Following The translatesAutoresizingMaskIntoConstraints is a property of UIView in the UIKit framework. It is a boolean value that determines whether the view's autoresizingMask properties are translated into Auto Layout constraints. When translatesAutoresizingMaskIntoConstraints is set to NO, the autoresizingMask is ignored and the view is resized accrding to any constraints that have been ...
Read MoreHow do I get a reference to the app delegate in Swift?
You should know what an AppDelegate is in Swift before jumping to how to get a reference to it. AppDelegate In an iOS application, the app delegate is the entry point for the application. Throughout the application, this object has been created once by iOS and is accessible in shared mode. It's responsible for handling key events and tasks related to your app's lifecycle, such as responding to system notifications and managing the app's window and view hierarchy. Where it is Defined? The app delegate class is typically defined in the AppDelegate.swift file of your Xcode project. It should conform ...
Read MoreMention the tools required to develop iOS applications
In this tutorial, we are going to study about different types of tools required to develop iOS applications. As we already know, there are approximately 1 billion iPhone users. Thus, Apple always provides a hassle−free environment for developers who want to build applications for iPhone, iPad, MacBook, and Apple Watch. Apple has built a strong ecosystem for developers so they can focus on writing code and building apps. Today, we will see what tools we need to develop applications on the Apple platform. Xcode This is an editor or IDE to write code for building apps. Apple released the ...
Read MoreWhat is plist in iOS?
In this tutorial, we will talk about how we can use the plist in the application to store information. Let’s first understand what is plist. What is plist? The plist file is also called the property list and is used by operating systems (e.g. iOS) and users. The information is stored in a key-value format similar to a dictionary. A plist file can contain different types of values like strings, arrays, dictionaries, booleans, dates, data, and numbers, such as integers. Most of these types correspond to native Swift types, such as Array and Bool. You can also store nested arrays ...
Read MoreHow to use giphy keys for ios users
You want to say something but someone else says it in the best way. Ever faced this kind of situation? When a post in Facebook needs just a touch of spice by adding few characters, but that’s what you don’t have. Well the wait is over GIPHY is on your rescue.Whenever you have a conversation online, GIPHY is there to help you. The GIF catalog is infinitely loaded with pop culture, original animations and real-time information that you can share on your phone, tablet, laptop etc. Every social site that you use twitter, Facebook, Gmail, tinder everyone has put GIFs.GIPHY ...
Read MoreTop 5 Tools to prototype iOS and Android apps without coding
Advancements in technology have rendered the world digital and drives mankind to experience new wonders of astronomical proportions. Internet has moved us from relative absurdity to a path filled with clarity. Two of the many promising wonders of modern digital technology are the endearing fields of website development and mobile app development.What is Prototyping?Prototyping allows you to create a prototype version of your website/app without actually coding anything. Such prototypes can be used to create a basic functional model of the application, get initial feedback, give demos, experiment with UI/UX, etc.Prototyping is undoubtedly one of the many important stages of ...
Read MoreHow to customise iOS button to set text and color?
In this post we will be seeing how to customise iOS button.So let’s get started.Step 1 − Open Xcode → New Project → Single View Application → Let’s name it “CustomiseButton”Step 2− Open Main.storyboard and add a button as shown below. We will customize this buttonThere are two ways to customise this buttonUsing StoryboardStep 1 − Click on the buttonStep 2 − In the right panel, in the attribute inspector you can change the text color, text and background color of the button as shown belowRun the project you will see the customise button as belowNow we will see the ...
Read More