Top 20 Most Frequently asked iOS Interview Questions and Answers

1) What is iOS?

iOS is a mobile operating system developed by Apple Inc. iOS offers iPhone and iPad application development using Objective C programming.

2) Why is the importance of using design pattern?

Design pattern facilitate reusable solution of common problems. Design pattern provides template designs which help to write code that are easy to understand and reuse.

3) What are the different tools uses for iOS application development?

iOS application development is done using Xcode and Swift tools. iOS application development industry currently uses Swift tool for app development.

4) What are the advantages of Swift?

Following are some main advantages of Swift:

  • It has optional types, which make applications crash-resistant.
  • Closures
  • Built-in error handling
  • Much faster compared to other languages
  • Supports pattern matching
  • Type-safe language

5) Grand Central Dispatch (GCD)

Grand Central Dispatch (GCD) is a library which provides a low level and object based API to run tasks concurrently while managing threads behind the scenes.

6) What is the difference between Synchronous & Asynchronous task?

Synchronous task waits until the task has completed. It guarantees that only one thread can be execute that code in the block at any given time.

Asynchronous task completes a task in background and can notify you when it completes.

7) What is a guard statement in Swift?

Guard statements are control flow statement. It basically evaluates a Boolean condition and proceeds with program execution if it is true. A guard statement always has an else clause, and it must exit the code block if it reaches there.

8) What is iOS Actions and Outlets?

Actions and outlets are used for referencing something on the storyboard. These are also known as IBAction and IBOutlet, where IB refers to interface builder. IBAction makes actions on the associated view controller class file.

9) What is Responder Chain?

Responder Chain is a hierarchy of objects that respond to event hierarchy.

Suppose we have a hierarchy of views such as superview A which have subview B. Now we touch on inner view B. The system will send touch event to subview B for handling this event. If B view does not want to handle this event, this event will be passed to its superview A (next upper responder). All the view which can respond to touch events is called responder chain. A view can also pass its events to UI view controller. If view controller also does not want to respond to touch event, it is passed to application object which discards the event.

10) What is iOS Accelerometer?

Accelerometer detect the changes made in the position of the device in the three directions x, y and z. It can show the current position of device from the ground.

11) What is iOS universal application?

This is such application which is designed for both iPad ans iPhone in a single binary. A universal application allows fast updates and code reuse.

12) What are the lifecycle of iOS view controller?

Following are the lifecycle of iOS view controller:

  • init(coder:)
  • (void)loadView
  • (void)viewDidLoad
  • (void)viewWillAppear
  • (void)viewDidAppear
  • (void)didReceiveMemoryWarning
  • (void)viewWillDisappear
  • (void)viewDidDisappear

13) What is iOS Auto Layout?

Auto Layout offers a flexible and powerful layout system that describes how UI controls and views are related to each other. Auto layout defines the relationship between elements and calculates the position of elements. Auto layout provides good control over layout and yield the perfect interface.

14) What is Code Coverage?

Code coverage is a tool that helps us to measure the value of our unit tests. With code coverage app developer can determine whether their tests are performing accordingly.

15) Which is most preferred database used in iOS app development and why?

SQLite is a mobile database which is most preferred database used in iOS app development. Following are the key features of SQLite database.

  • It is lightweight and fast execution.
  • It provides an embedded SQL engine.
  • It is very reliable.
  • It does not require any extra active services, and work as a part of the app itself.
  • It is fully supported by Apple and used for both iOS and mac OS.

Pin It on Pinterest

Share This