Interviewer And Interviewee Guide

Essential Swift Developer Interview Questions & Answers:

1. Tell me regular Expression And Responder Chain?

Regular Expression – These are the special string patterns that describe how a search is performed through a string.

Responder Chain – It is a hierarchy of objects that obtain the opportunity to respond to the events.

2. What is completion handler?

When our application is making an API call and we are supposed to update the UI to show the data from the API call, then Completion Handler becomes handy and is super convenient.

3. Explain me what is a category and when is it used?

A category is a way of adding additional methods to a class without extending it. It is often used to add a collection of related methods. A common use case is to add additional methods to built in classes in the Cocoa frameworks. For example adding async download methods to the UIImage class.

4. Please explain regular expression and Responder chain?

Regular Expression – These are the special string patterns that describe how a search is performed through a string.

Responder Chain – It is a hierarchy of objects that obtain the opportunity to respond to the events.

5. Explain how Can You Define A Base Class In Swift?

The classes are not inherited directly from the base class in the Swift programming language.The classes defined by the developer without specifying the superclass becomes the base class automatically.

6. Please explain some common execution states in iOS?

The states of the common execution can be as follows:

☛ Not running – This state means that there is no code that is being executed and the application is completely switched off.
☛ Inactive – This state means that the application is running in the background and is not receiving any events.
☛ Active – This state means that the applications are running in the background and is receiving the events.
☛ Background – This state means that the application is executing the code in the background.
☛ Suspended – This state means that the application is in the background and is not executing.

7. Tell me what Is Dictionary In Swift?

It enables you to store the key-value pairs and access the value by providing the key.It is similar to that of the hash tables in other programming languages.

8. Explain me what Is Swift Programming Language?

Swift is an innovative new programming language for Cocoa and Cocoa Touch. Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast. Swift is ready for your next iOS and OS X project - or for addition into your current app - because Swift code works side-by-side with Objective-C.

9. Tell us any three-shift pattern matching techniques?

☛ Typecasting Patterns – This pattern allows you to match or cast the types.
☛ Wildcard Patterns – This pattern matches as well as ignores any kind and type of value.
☛ Optional Patterns – This pattern is used to match the optional values.

10. Tell us what Are The Control Transfer Statements In Swift?

The control transfer statements in swift are:

☛ Continue
☛ Break
☛ Fallthrough
☛ Return

Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.