Greens Technologys Whatsapp
Greens Technologys Phone Icon

Best iOS Interview Questions and Answers

(5.0)  |   85,984 Ratings

11) What’s the difference between not-running, inactive, active, background and suspended execution states?

  • Not running: The app has not been launched or was running but was terminated by the system.
  • Inactive: The app is running in the foreground but is currently not receiving events. (It may be executing other code though.) An app usually stays in this state only briefly as it transitions to a different state.
  • Active: The app is running in the foreground and is receiving events. This is the normal mode for foreground apps.
  • Background: The app is in the background and executing code. Most apps enter this state briefly on their way to being suspended. However, an app that requests extra execution time may remain in this state for a period of time. In addition, an app being launched directly into the background enters this state instead of the inactive state.
  • Suspended: The app is in the background but is not executing code. The system moves apps to this state automatically and does not notify them before doing so. While suspended, an app remains in memory but does not execute any code. When a low-memory condition occurs, the system may purge suspended apps without notice to make more space for the foreground app.

12) How many UITableViewCells are allocated when you first load a UITableView? How many additional ones are allocated as you scroll through the table?

A UITableView will normally allocate just enough UITableViewCell objects to display the content visible in the table. Because of the reuseIdentifier , the UITableView will not allocate new UITableViewCell objects for each new item that scrolls into view, avoiding laggy animations.

13) Difference between frame and bounds ?

The bounds of an UIView is the rectangle, expressed as a location (x,y) and size (width,height) relative to its own coordinate system (0,0).

The frame of an UIView is the rectangle, expressed as a location (x,y) and size (width,height) relative to the superview it is contained within.

14)What’s the difference between using a delegate and notification?

Both are used for sending values and messages to interested parties. A delegate is for one-to-one communication and is a pattern promoted by Apple. In delegation, the class raising events will have a property for the delegate and will typically expect it to implement some protocol. The delegating class can then call the delegates protocol methods.

Notification allows a class to broadcast events across the entire application to any interested parties. The broadcasting class doesn’t need to know anything about the listeners for this event, therefore notification is very useful in helping to decouple components in an application.

15) Explain lazy in Swift

The lay properties are a lot of help for the iOS developers. In the context of lazy, the value of the lay at the initial value is calculated only when its been called for the first time

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

Synchronous : waits until the task has completed
Asynchronous : completes a task in background and can notify you when complete

17) What is DTO ?

DTO is widely used in web projects. It declares the response to the Mappableprotocol. It contains the implementation of the mapping(map: Map) function

18) What is DispatchGroup?

Allows for aggregate synchronization of work. We can use them to submit multiple different work items and track when they all complete, even though they might run on different queues. This behavior can be helpful when progress can’t be made until all of the specified tasks are complete.

19) What are the control transfer statements in swift?

The control transfer statements in swift are:

  • Continue
  • Break
  • Fallthrough
  • Return

20)What are layer objects?

Layer objects are data objects which represent visual content and are used by views to render their content. Custom layer objects can also be added to the interface to implement complex animations and other types of sophisticated visual effects.

21) Explain what is the difference between Xcode, Cocoa and Objective C?

  • Xcode: It is the integrated development environment (IDE) that developer use to write software for IOS or OS X.
  • Objective-C: It is the language most preferred by developer to write programs for apple
  • Cocoa: It is the application

22) Explain the Adapter and Memento Pattern?

Adapter – It lets the classes with incompatible interfaces to work together and it wraps itself around the object to expose a standard interface to interact with that object.

Memento – This pattern in iOS is used as a part of state restoration.

That is this externalized state can be restored without violating any encapsulation.This pattern is especially used for the archiving in Apple.

23) Mention what are the source items used by Xcode?

Xcode uses four different types of source items

  • Source File
  • Source Group
  • Source Folder
  • Framework

24) What are Selectors in Objective-C?

A Selector in Objective C can be used to refer the name of a method when it is used in a Source-Code message to an Object. It also refers to the unique identifiers that can replace the Name when the Source Code is being Compiled. All the methods that have the same name have the same selector.

25)List out what the different control statements used used in Swift.

Continue, Break, Fallthrough and Return. However, while it’s important to know these control statements, what would really impress an interviewer is being able to have a dialogue around how each of you uses these controls, which you use most often, etc.

26) What is Singleton Pattern?

The Singleton design pattern ensures that only one instance exists for a given class and that there’s a global access point to that instance. It usually uses lazy loading to create the single instance when it’s needed the first time.

27) Explain KVC — KVO?

KVC adds stands for Key-Value Coding. It’s a mechanism by which an object’s properties can be accessed using string’s at runtime rather than having to statically know the property names at development time.

KVO stands for Key-Value Observing and allows a controller or class to observe changes to a property value. In KVO, an object can ask to be notified of any changes to a specific property, whenever that property changes value, the observer is automatically notified.

28) Name the framework that is used to construct application’s user interface for iOS.

The UIKit framework is used to develop application’s user interface for iOS. UIKit framework provides event handling, drawing model, windows, views, and controls specifically designed for a touch screen interface.

29) Which object is create by UI Application Main function at app launch time?

The app delegate object is created by UIApplicationMain function at app launch time. The app delegate object’s main job is to handle state transitions within the app.

Do not wait anymore! Call Us @ 89399 15577 to know more about iOS Training in chennai. You can also contact us by submitting the Quick Enquiry form on the right side of this page to know more about the iOS Course in Chennai.

For Chennai Branches
Adyar - +91 89399 15577
OMR - +91 89399 25577
Velachery - +91 89399 15577
Tambaram - +91 89399 25577


Our Reviews 5 Star Rating: Recommended - Best IT Training in Chennai

5  out of 5  based on 12263 ratings.

Google          5 Star Rating: Recommended - Best IT Training in Chennai

Facebook      5 Star Rating: Recommended - Best IT Training in Chennai

UrbanPro       5 Star Rating: Recommended - Best IT Training in Chennai

Sulekha         5 Star Rating: Recommended - Best IT Training in Chennai

Yet5              5 Star Rating: Recommended - Best IT Training in Chennai

Justdial          5 Star Rating: Recommended - Best IT Training in Chennai

Top Courses