TagSwift

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

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