Category Archives: Swift

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

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 us 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 Xcode… Read more »

Fatal error: unexpectedly found nil while unwrapping an Optional value

fatal error: unexpectedly found nil while unwrapping an Optional value This error is caused by unconditionally unwrapping an optional  which had nil. Optional is a type in swift which can either contain a value or no value nil. When a optional variable or constant which contains nil is forced unwrapped… 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 »