HCL Interview Questions for IOS Developer
- 1) What is SwiftUI?
- 2) What are high order functions in swift?
- 3) What is a self in Objective c?
- 4) What is use of delegates in IOS?
- 5) What are the App states in IOS?
- 6) What is NSNotification?
- 7) What is use of question mark ? in Swift?
- 8) What is optional chaining?
- 9) What are Tuples in Swift?
Below are the list of Best HCL IOS Developer Interview Questions and Answers
The high order functions in swift are as follows
- FirstIndex and LastIndex
In Objective-C, the self is a special variable, in an instance method that refers to the receiver (object) of the message as well as invoking the method, while in a class method the self will indicate which class to call. This is the actual object that is used in runtime to execute the current method as an invisible argument.
Delegates are used in iOS to establish communication within modules that are partially related to each other. For instance, passing data forward is very easy with the use of segue. However, sending data backward is a little tricky, so we use the delegate to send the data backward.
The app states in IOS are as follows:
- Non-running - It indicates that the app is not running.
- Inactive - It indicates that the app is running in the foreground, but not receiving events.
- Active - It indicates that the app is running in the foreground, and receiving events.
- Background - It indicates that the app is running in the background, and executing code.
- Suspended - It indicates that the app is in the background, but no code is being executed.
NSNotification is an object containing information generally considered as a class. It is broadcast to registered observers that bridge to Notification. It is used when you need reference semantics or other Foundation-specific behavior.
Declaration of NSNotification: class NSNotification: NSObject.
Question marks ? in Swift, is a way that lets you indicate the possibility that a value might be absent for any type at all, without the need for special constants.
Optional chaining is the process of querying, calling properties, subscripts, and methods that may be 'nil'. Since multiple queries to methods, properties, and subscripts are grouped together that failure to one chain will affect the entire chain and results in a 'nil' value. Optional chaining is used to set and retrieve a subscript value that validates whether a call, to that subscript, returns a value.
In swift, tuples are used to group multiple values into a single by using parentheses and separated by commas. It enables you to create, store, and pass around groups of values that can be of different types by using a single variable. It is needed to define those values with named variables or unnamed variables.
For instance, a simple example of defining named tuples in the swift programming language is as follows:
let user_info = (name: "Suresh Dasari", id: 200) Or var user_info:(name:String, id:Int) = ("Suresh Dasari", 200)
A simple example of defining unnamed tuples in the swift programming language is as follows:
let userInfo = ("Suresh Dasari", 200) Or var userinfo:(String, Int) = ("Suresh Dasari", 200)
Latest Interview Questions
SDET Interview Questions
AWS ELB Interview Questions
Laravel Latest Questions
Loadrunner Interview Questions
Exit interview Questions
Ldap Server Interview Questions
Infrastructure as Code tools & Platforms
DOJO Interview Questions
Splunk Interview Questions
JBehave Interview Questions
React Native Interview Questions
Angular 8 Interview Questions
NLP Interview Questions
Go Programming Language
Dynamodb Interview Questions
Symfony Interview Questions
Angular 2 Interview Questions
Software Engineering Interview Questions
C Programming Interview Questions
OpenCart Interview Questions
Fuel PHP Interview Questions
Subscribe Our NewsLetter
Never Miss an Articles from us.