Mohtashim M has Published 35 Articles

How to create CollectionView Layout in an iOS App?

Mohtashim M

Mohtashim M

Updated on 03-Jul-2020 07:17:17

337 Views

CollectionView with TableView are two of many fundamental concept of iOS development, every developer should master both to be a good developer.In this post we will be focussing mainly on CollectionView, CollectionView is same as table view with some difference, Collection View supports both horizontal and vertical scrolling which looks ... Read More

How to prevent the screen from sleeping in iOS?

Mohtashim M

Mohtashim M

Updated on 16-Dec-2019 12:28:43

273 Views

In this post we will be seeing how to prevent screen from sleeping in iOS.So, let’s get started.Copy the below line of code in viewDidLoad method in ViewController.Swiftoverride func viewDidLoad() {    super.viewDidLoad()    // Do any additional setup after loading the view, typically from a nib.    UIApplication.shared.isIdleTimerDisabled = ... Read More

How to create Tab Bar Layout in an iOS App?

Mohtashim M

Mohtashim M

Updated on 16-Dec-2019 12:27:33

217 Views

In this post we’re going to see how one can use tab bar layout in their application.As per apple’s documentation −A tab bar appears at the bottom of an app screen and provides the ability to quickly switch between different sections of an app. Tab bars are translucent, may have ... Read More

How do I programmatically “restart” an iOS app?

Mohtashim M

Mohtashim M

Updated on 16-Dec-2019 12:24:41

1K+ Views

You cannot restart an iOS Application in any case, even if you’re able to do using some private api your application will be rejected by Apple and will not be considered for App store release.

How to create a file, write data into it and read data from it on iOS?

Mohtashim M

Mohtashim M

Updated on 16-Dec-2019 12:23:05

1K+ Views

Being a software developer we should be always aware of how to play with files, write to a file, read from the file and so on.In this post we are going to learn the same, we will be creating a file and writing the data to the file and later ... Read More

How to send an attachment in email using Swift(ios)?

Mohtashim M

Mohtashim M

Updated on 23-Oct-2019 09:05:25

2K+ Views

Knowing how to send attachments in the email is very important since most of the application has sharing features. Hence having hands-on experience is important.In this post, we will be seeing how to send an attachment in the mail using Swift.So, let’s get started.For this, we will be using MFMailComposeViewController, ... Read More

How to call a method after a delay in Swift(iOS)?

Mohtashim M

Mohtashim M

Updated on 23-Oct-2019 08:40:00

2K+ Views

In this post, we will be seeing how you can delay a method call using Swift. Here we will be seeing how you can achieve the same in two ways, So let’s get started, We will be seeing both the example in Playground, Step 1 − Open Xcode → New ... Read More

How to rotate an image in imageview by an angle on iOS App using Swift?

Mohtashim M

Mohtashim M

Updated on 23-Oct-2019 08:36:31

3K+ Views

Images are everywhere almost in all application, you might have come across many applications like gaming applications where you see images getting rotated.So, In this post, we will be seeing how to rotate the image in an image view by an angle in an iOS application.So, Let’s get started, Step ... Read More

How to generate Unique ID of device for iPhone/iPad using Swift?

Mohtashim M

Mohtashim M

Updated on 30-Aug-2019 11:44:07

1K+ Views

UDID(Unique Device Identifier) − A sequence of 40 hexadecimal characters that uniquely identify an iOS device.Since from iOS 5, Apple has deprecated the UIDevice unique identifier, that means the traditional way of getting the unique id. Apple removed the truly unique identifier and introduced an identifier for each vendor i.e ... Read More

How to add 1 day to a Date in iOS/iPhone?

Mohtashim M

Mohtashim M

Updated on 30-Aug-2019 11:40:21

116 Views

A Date value encapsulates a single point in time, independent of any particular calendrical system or time zone. Date values represent a time interval relative to an absolute reference date.Here we will be seeing how to add 1 day to date, For this, we will be using Playground, Copy the ... Read More

Advertisements