Tagios

Move View/ScrollView to keep TextField visible when keyboard appears!

M

There is a very common but tricky part comes while handling textfields position when keyboard appears. Its sometimes become headache for developers to handle such small but tricky issue. When keyboard appears then some textfields get covered and user can’t see while editing it. There are some solutions to handle this but many of them works only for the first time. And then doesn’t...

Alternative for xib in swift3 iOS

A

Hi all, Lets see the simplest and best way to replace or avoid use of xib by using UIView on storyboard.    Go on storyboard ,select Viewcontroller Drag UIView and drop it between FirstResponder and exit button on that.  Add IBOutlet of that UIView on ViewController.swift file.  set the center, width, height for that UIView  Refer Following code :   ——– IBOutlet...

UserDefaults with NSCoding and Codable to save any kind of Data… Part – 1 ?

U

 UserDefaults  is one of the good and handy storage you can use. You can use UserDefaults to store any basic data type for as long as the app is installed. For example, you can use basic types as Bool, Float, Double, Int, String, or URL, but you can also write more complex types such as arrays, dictionaries and Date – and even Data values. Advantage: After writing data to UserDefaults, when you...

Push Notification displayed when application in foreground in iOS 10

P

Introduction:  The new framework called “UserNotifications” is introduced with iOS 10 SDK. The UserNotifications framework (UserNotifications.framework) supports the delivery and handling of local and remote notifications when application is in foreground Steps for implement code to handle push notifications in iOS 10 Import UserNotifications.framework in your AppDelegate file :                 ...

Animation like floating Buttons.

A

Hi all, today we will check out simple but cool floating buttons using UIViewAnimations methods. So, in this we are going to show 4 buttons which came out upside from another button. Here we are using constraints of  buttons, button and UIViewAnimations. Let’s start with  adding constraint to each buttons. 1) Setting constraints for buttons:-     Add constraint such that bottom constraint...

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...

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