Top 20 iOS interview Questions — Part 2

1. What is application life cycle?

  • Not Running state
  • Inactive state
  • Active state
  • Background state
  • Suspended state

2. What is optional?

4. What are the ways to unwrap optionals?

  • Forced Unwrapping
  • Optional Binding
  • Optional chaining
  • With implicitly unwrapped optionals, using !
  • Nil coalescing operator
  • Unwrapping using higher order function

5. What is Optional Chaining?

6. How can we iterate all enum cases?

7. What is Associated Values?

8. What is frame and bounds?

9. What happen if we change bounds?

10. How can we create custom views?

  • Using Storyboard
  • Using XIB
  • Creating views programatically.

11. How can we set view size in ios?

  1. You can directly setting the frame of a view.
  2. Adding dynamism with Autoresizing mask.
  3. Positioning a view with AutoLayout

12. What is Autoresizing mask?

13. What is Intrinsic Content Size?

14. How Autolayout represent view’s intrinsic content size?

15. What is Content hugging?

16. What is Compression resistance?

17. What is Fitting Size?

18. what are Access Control in Swift?

  1. open and public — anyone can access, within the module, and in code that imports the module
  2. internal — anyone can access, but only within the module (default)
  3. fileprivate — anyone can access, but only within the current Swift file
  4. private — only the enclosing declaration can access, such as a class or struct.

19. what is difference between open and public access control?

  • public classes and class members can only be subclassed and overridden within the defining module (target where they’re defined).
  • open classes and class members can be subclassed and overridden both within and outside the defining module (target where they’re defined).

20. difference between objective c and swift?

  1. which as header file and implementation file (i.e .h and .m)
  2. Objective C is a general purpose language which is considered as superset of C language it was designed in an aim of providing object-oriented capabilities.
  3. Objective C is dynamic type.
  4. Objective C is licensed under General Public License.
  5. Uses the ARC supported only within the cocoa API
  6. No support for dynamic libraries
  1. Swift is a general-purpose, high-level programming language which is highly concerned about safety, performance
  2. Easy to read and maintain.
  3. Swift is static type.
  4. Swift is apache licensed open source project.
  5. Support ARC for all APIs
  6. Dynamic libraries are supported

--

--

--

iOS Developer in walmart

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Find the Minimum Number of Steps in an Infinite Grid

The First Steps Towards DAO

Automate paperwork and never copy manually data from a PDF again with Box and Docparser

Product Management: What it really means

BGPKIT Journey Started

Lending dApp Guide

How To Fix Micromax Canvas Mega 4G Q417 Not Charging [Troubleshooting Guide]

Instructions Creation Platform, Dux, Announces Public Beta Launch

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Manasa M P

Manasa M P

iOS Developer in walmart

More from Medium

A SWIFT Action

The Anatomy of a Product

Connect 4 Game on iOS (四子棋)

What are the Challenges of Blockchain Application in the Education Sector and their Viable…

QR code certificate verification