In-House Articles



Jobs



Cracking the iOS Interview

Which are the ways of achieving concurrency in iOS?

Concurrency means executing more than one task at a time. In iOS, we can achieve concurrency using Operation Queues, Dispatch Queues (GCD), or Threads.

Swift Anytime Weekly

What are the advantages of lazy stored properties?

  1. The statements in the closure of the lazy property execute only if you read the property.
  2. If you never read a lazy property, you can avoid unnecessary allocations and computations.
  3. You can access stored property inside the lazy property.
Swift Anytime Weekly

Code Quiz

We are having a function called fetchData() which fetches data from a particular JSON file. The data in that file is type String. After decoding it, we reflect the changes in UI by setting a label to that text.

But the changes are not reflected in UI. Meaning that the line of interest is not executed. How can we fix this?

Hint: URL tasks are usually done on a background thread

Solve the quiz and submit your answer along with your Twitter handle at team@swiftanytime.com

Swift Anytime Weekly

Thanks for Reading

We at Swift Anytime try to bring the best iOS ecosystem information for you that’s not only valuable but also most relevant based on your experience & preference.

Swift Anytime Weekly