Category Archives: Swift

Swift is the new language introduced by Apple and is used for developing application in iOS platform.

Using PromiseKit and Alamofire For Clean API Layer

      No Comments on Using PromiseKit and Alamofire For Clean API Layer

Promise kit and Alamofire when used together create a very powerful and flexible API Layer Every App interacting with web services contains an API layer which separates API handling from the rest of the application logic. Usually, the API layer is implemented using delegates or escaping closures. Escaping closures and delegates are… Read more »

Swift Interview Questions and Answers

      No Comments on Swift Interview Questions and Answers

This article is meant to be a guide. Target is to evolve it to a exhaustive list of swift questions and answers with your support. Given below are few of the most common questions asked in swift interview straight from swift docs, which according to me is a must read… Read more »

WKWebView NSCoding support was broken in previous versions

WebKit was introduced in iOS 8 but was released with an error which resulted in a runtime crash if the configuration was done using Interface Builder. So in Xcode 9 if your project configuration has minimum OS support less than 11.0 and you try to add WebKit using interface builder… Read more »

Add Custom Font in iOS Application Xcode 9

      No Comments on Add Custom Font in iOS Application Xcode 9

Adding custom font of your choice or of your business theme, in your iOS app is quite important. Custom fonts can enrich your app and transform it from just and app to an awesome app. Adding custom font in iOS application is a step by step process. In this article… Read more »

Swift: Split a String into an array

      No Comments on Swift: Split a String into an array

In Objective-c we used componentsSeparatedByString NSString *stringToSplit=@”str0,str1,str2,str3,str4,str5″; NSArray *arrayFromString = [str componentsSeparatedByString:@”,”]; In swift we can split a string into array simply by calling split() method var stringToSplit = “str0,str1,str2,str3,str4,str5” let arrayFromString = stringToSplit.split(separator: “,”) Less code.. 🙂

Passing Data between View Controllers

      No Comments on Passing Data between View Controllers

A ViewController in an application is seldom standalone in nature. They require data from ViewControllers in front and from those behind them, this leaves us with two types of data passing Forward Data passing Backward data passing For discussing both kinds of data passing we have two ViewCotrollers ASViewController ASViewControllerB… Read more »