Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Ultimate iOS Interview Playbook

You're reading from   The Ultimate iOS Interview Playbook Conquer Swift, frameworks, design patterns, and app architecture for your dream job

Arrow left icon
Product type Paperback
Published in Aug 2023
Publisher Packt
ISBN-13 9781803246314
Length 320 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Avi Tsadok Avi Tsadok
Author Profile Icon Avi Tsadok
Avi Tsadok
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1: Everything about Interviews
2. Chapter 1: Before the Interview FREE CHAPTER 3. Chapter 2: Going through the Interview Process 4. Chapter 3: Developer Branding 5. Part 2: Swift Language and Coding
6. Chapter 4: Data Structures and Algorithms 7. Chapter 5: The Swift Programming Language 8. Chapter 6: Managing Your Code 9. Part 3: The Frameworks
10. Chapter 7: Building Great User Experiences with UIKit 11. Chapter 8: SwiftUI and Declarative Programming 12. Chapter 9: Understanding Persistent Memory 13. Chapter 10: Libraries Management 14. Part 4: Design and Architecture
15. Chapter 11: Design Patterns to Solve Complex Questions 16. Chapter 12: Drilling into App Architecture 17. Chapter 13: Acing the Coding Assessment 18. Index 19. Other Books You May Enjoy

Advanced Swift language features

Generally, interviewers like to start up softly with Swift features, checking different language aspects and trying to locate any red flags we might have about Swift.

In this section, we will go through more advanced features of Swift, beginning with computed and lazy variables.

Solving computed and lazy variables questions

Computed and lazy variables are both advanced features of Swift variables, providing efficient ways to improve performance and code readability.

First, let’s be aligned about what computed and lazy variables are:

  • Computed variable – a variable that calculates its value based on other properties, doesn’t store its value in memory, and calculates it every time it’s accessed

In the following Rectangle class, area is a computed variable that is based on width and height values:

class Rectangle {    var width: Double
    var height: Double...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image