и посмотреть медиа
Swift | Interview Questions
и посмотреть медиа
Swift interview questions, tests and tasks for iOS developers in Telegram.
Swift interview questions, tests and tasks for iOS developers in Telegram.
AI bot for text-to-speech and voice cloning in Telegram. Create audio using neural network quickly and easily.
The channel is dedicated to preparing for Swift language interviews. It contains current questions, tests, practical tasks and vacancy information. Ideal for beginner and experienced iOS developers who want to refresh their knowledge and successfully pass interviews.
🤔 Перечислите все ленивые (lazy) контейнеры/вью? В iOS существует несколько ленивых (lazy) контейнеров и вью, которые откладывают создание или загрузку элементов до момента их фактического использования. 🚩`lazy var` (ленивые свойства) Обычное свойство инициализируется сразу, а lazy – только при первом вызове. class Example { lazy var expensiveObject: Data = { print("Объект создан!") return Data() }() } let obj = Example() print("Объект ещё не создан") _ = obj.expensiveObject // Только теперь создастся 🚩`LazySequence` и `LazyCollection` Если вы хотите избежать лишних вычислений, можно использовать ленивую последовательность: let numbers = (1...1000).lazy.map { $0 * 2 } // Не вычисляется сразу! print(numbers.first!) // Только теперь вычисляется первый элемент 🚩`LazyVStack`, `LazyHStack`, `LazyGrid` (SwiftUI) В отличие от обычных VStack и HStack, ленивые версии создают элементы только при прокрутке. ScrollView { LazyVStack { ForEach(0.. UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) cell.textLabel?.text = "Строка \(indexPath.row)" return cell } Ставь 👍 и забирай 📚 Базу знаний
Открыть канал и посмотреть медиаOnly registered users can share their opinion.
Be the first to share your impression of this resource!