ArchiveSeptember 2017

Download PDF file using Alamofire in Swift3

D

Almofire is a very popular library for networking related coding(eg. API call, Downloading Stuffs etc) and totally developed in swift which is replacement of AFNetworking library of ObjectiveC. It has multiple features like Image cacheing, API call integration,File downloading etc. Today we are going to dive into Download PDF file using Alamofire in Swift. Pods are available for almofire on...

One fantastic way to Load ‘CollectionView’ inside ‘TableViewCell’ using Two ‘Extensions’ in swift3, iOS

O

As We know we, Often, we assign a collection view’s data source to its view controller. But here the problem is that we have only one view controller and many collection views. As I have taken number of ‘Sections’ inside table view. so following is the Solution to distinguish between a collection view on the first section , and one on the second , third and fourth… So here is a way to...

iOS – Tap to zoom and share image using Apple’s QuickLook framework

i

QuickLook framework is one of the best framework by Apple. It can be used to preview files such as iWork, MS Office, RTF, CSV documents, pdf, text files, Images. You can use this framework to implement image zooming and sharing feature. We don’t need to write this zooming and sharing code ourself. QuickLook framework provides this all awesome functionality. Let’s start implementing...

Animated Launch Screen

A

Basically when we want to set an image for LaunchScreen then we use LaunchScreen.storyboard for setting an image, but as this file does not have any class file (eg .swift or .h & .m) so we can not write code for animating that image at runtime. To achieve this we need to use main.storyboard Steps to implement animated Launch Screen : – 1) Click on project name on ProjectNavigatorPanel ...

NSSortDescriptor in swift 3

N

To sort an json array using NSSortDescriptor in swift3   NSSortDescriptor : A sort descriptor describes a comparison used to sort a collection of objects. You create an instance of NSSortDescriptor that specifies the property key to be sorted, and whether the comparison should be in ascending, or descending order. A sort descriptor can also specify a method to use when comparing the property...

iOS – Image Downloader helper class (Swift 3)

i

Image Downloader Class written in Swift 3 to download images. class Downloader {         class func downloadImageWithURL(_ url:String) -> UIImage? {            let data = try? Data(contentsOf: URL(string: url)!)          if let imgData = data {             return UIImage(data: imgData)         }         else {             print(“\n\nThis image url may be wrong : \n \(url)”)        ...

Category