iOS Developers

Topics to Review

Swift

The following list was taken from Codepath.

  1. What is ARC and how does it work?

  2. How is ARC different from Java's garbage collector?

  3. What is a property?

  4. When should a property be strong vs weak?

  5. Why do strong reference cycles cause a memory leak in Swift (and Objective-C), but not in Java?

  6. What does it mean to "capture self" in a closure and why can it lead to a memory leak?

  7. What is the syntax for a property that can store a closure?

  8. What does inferred typing mean in Swift?

  9. What is an implicitly unwrapped optional?

  10. When would you use ? vs ! to unwrap an optional?

  11. When casting, when would you use as? vs as!

  12. What is another syntax for unwrapping an optional?

  13. What is optional chaining?

  14. What is Any vs AnyObject vs NSObject?

  15. What is the syntax for a property getter/setter?

  16. What is a property observer?

  17. What is a failable initializer?

  18. What is a required vs convenience initializer?

  19. What are the rules for initializers with respect to inheritance?

  20. What is an extension?

  21. What is guard & defer? When would you use them and why?

  22. When would you use a struct vs class?

  23. What scopes exist in Swift?

  24. What is @escaping for closures?

Core iOS

General

  1. Describe the application lifecycle.

  2. Which 2 lifecycle methods handle push notifications?

  3. What is a run loop?

Views

  1. What is a CALayer? How are layers and views related?

  2. What is the difference between frame and bounds?

  3. What are all the reasons a button might not work? List at least 3.

  4. What properties of a view can be animated?

  5. How would you animate an infinite rotation? Or animate rounding a corner?

Scroll Views, Table Views, and Collection Views

  1. Describe content inset, content offset, and content size.

  2. How do you use auto layout to set the content size?

  3. Describe the data source pattern and why table views and collection views use it.

  4. What is cell recycling and why is it important?

  5. How would you implement a table view with different cell types, similar to the Facebook feed? Can you still use cell recycling?

  6. How would you implement infinite loading, i.e., automatically fetching the next page when the user reaches the bottom of the feed.

  7. In which situations is it useful to use a table view vs a collection view? Given that a collection view is more flexible and powerful than a table view, why would you still use a table view?

Auto Layout

  1. What is the difference between Auto Layout and Autoresizing masks?

  2. What is the difference between content hugging priority & content compression resistance priority?

  3. What is intrinsic content size?

  4. How would you animate views with Auto Layout?

View Controllers

  1. What are the view controller lifecycle methods?

  2. How do you handle device rotation?

  3. What is a container view controller? Describe how to implement a container view controller.

  4. When would you implement a container view controller vs a custom view controller transition?

  1. What method do we use to pass data to another view controller that we are navigating to?

  2. How do we pass data back when we are returning from another view controller?

  3. How do you programmatically push/pop a view controller?

  4. How do you programmatically present/dismiss a view controller?

Persistence

  1. What are the different types of persistence in iOS, and when would you use each type?

  2. What are the pros/cons of SQLite vs Core Data?

  3. How do you handle schema migrations in Core Data?

Networking

  1. What are the differences between NSURLConnection and NSURLSession?

  2. Describe App Transport Security and how to configure it.

  3. What features do AlamoFire add on NSURLSession?

Multithreading

  1. UIKit is not thread-safe, what are examples of things you have to do in the main thread? How do you ensure that your code is thread-safe?

  2. When using a 3rd party library like AlamoFire, what thread is the completion closure called in? Is that always guaranteed?

  3. What is the difference between NSOperationQueue and Grand Central Dispatch?

  4. When would you call dispatch_sync vs dispatch_async?

  5. How would you implement a maximum number of concurrent operations using Grand Central Dispatch?

  6. How does parallel multithreading (ex thread 1 waits on thread 2) work?

Extended iOS

  1. What are the pros and cons of programmatic views vs Storyboard?

  2. Describe the differences between MVC and MVVM.

  3. Describe the basic usage of RxSwift? What are the pros/cons of reactive programming?

  4. How would you implement cell re-ordering using a collection view? E.g., a user should be able to drag a cell into a different position in the collection view.

  5. How would you securely store API keys?

  6. Compare and contrast CocoaPods and Carthage. Which do you prefer?

  7. How do you avoid memory leaks in iOS? How do you use Instruments to detect leaks?

  8. What are some interesting updates in the latest version of iOS? Look at the latest iOS release notes and scan the titles of the most recent WWDC. This is sometimes asked to test your interest level in iOS and how well you track the latest.

  9. Name 3 libraries that you like to use in apps and why?

  10. Describe unit/integration testing in iOS. What are some popular open source libraries related to unit/integration testing?

Last updated