Questions and Answers for the interview of iOS developers: Part 3

What is the difference between a synchronous and an asynchronous task?

Synchronous: waits for the task to complete. Asynchronous: completes the task in the background and notifies you of completion.

What is b-trees?

These are search trees that provide an ordered repository of critical values with excellent performance characteristics. Each node stores a sorted array of its own elements and another array for its children.

What is an NSError object?

There are three parts of the NSError object: a domain, an error code, and a dictionary with user information. A domain is a string that identifies which category the error belongs to.

What is the Enum?

Enum is a type, which contains a group of related values.

What is a bounding box?

The limiting parallelepiped is the term used in geometry; it means the smallest measure (area or volume) within which a set of points is located.

Why do not we use strong for enum in Objective-C?

Since enum is not objected, we do not specify strong or weak here.

What is @synthesize in Objective-C?

Synthesize generates the getter and setter methods for your property.

What is @dynamic in Objective-C?

We use dynamic for subclasses of NSManagedObject. @dynamic tells the compiler that the getter and setters are implemented somewhere else.

Why do we use synchronized?

Synchronized ensures that only one thread can execute this code in the block at any one time.

What is the difference between strong, weak, read-only, and copy?

The attributes of the strong, weak, assign an attribute to determine how the memory for this property will be managed.

Strong means that in the generated setter the counter of references to the assigned object will be increased and the reference to it will be maintained during the lifetime of the object.

Weak means that we point to an object, but do not increase the reference count. It is often used when creating parent-child relationships. The parent has a strong link to the child, but the child has only a weak reference to the parent.

Read-only – we can set the property from the beginning, but then it cannot be changed.

Copy means that we copy the value of the object when it is created. Also prevents changing its value.

What is Dynamic Dispatch?

Dynamic Dispatch is the process of selecting a polymorphic implementation that is a method or function for a run-time call. This happens when we want to call our methods as an object method. Swift does not default to Dynamic Dispatch.

What is code coverage?

Code coverage is a metric that helps us measure the value of our unit tests.

What is the termination handler?

The exit handlers are very useful when our application calls the API, and we need to do something when this task is done: for example, update the user interface to display data from the API call. The exit handlers can be found in the Apple API, for example, dataTaskWithRequest, and they can be very useful in your code.

The exit handler takes a code with three arguments: (NSData? NSURLResponse? NSError?), Which returns nothing: void. This means completion.

The exit handlers must be labelled @escaping since they are executed after the function is executed.

How to define the place of usability in design?

To do this, you need to break the design process into four steps:

  • Think like a user, and then create a UX.
  • Remember that users are people, not their demographic data.
  • When promoting the application, think about all the situations in which it will be useful.
  • Continue to work on the convenience of the application even after the launch.
Close

About The Author

Ruchi Singla
An enthusiast writer with years of experience, who loves to create beautiful thoughts into words. She writes with a zeal and enjoys reading vogue with a good cup of coffee when not writing. Ruchi is working as a content writer for many businesses, helping them gain an extra edge over their competitors. As a content writer, she is responsible for enhancing engagement and traffic on the blog by brainstorming exciting content ideas.

This site uses Akismet to reduce spam. Learn how your comment data is processed.