Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

SwiftUI PreferenceKeys

Автор: Stewart Lynch

Загружено: 2023-05-21

Просмотров: 5162

Описание:

In this tutorial, I am going to introduce you to SwiftUI PreferenceKeys. If you've been creating SwiftUI applications for a while, you might have been using them without even realizing it.

Firstly, I will explain what a preferenceKey is and demonstrate how you have been utilizing them in your own projects since the early stages of SwiftUI development. It's fascinating to discover the hidden power behind these essential tools.

Next, I will delve into the structure and requirements for creating custom PreferenceKeys. I'll guide you through the process and show you how to utilize the Reduce function to send information up your view hierarchy instead of the traditional approach of passing down variables through the environment.

To make things more practical and engaging, I will provide four examples throughout the video. Some of these examples may seem contrived, but they serve the purpose of showcasing the true potential of preference keys. You'll gain a solid understanding of their capabilities and how they can be effectively integrated into your own applications.

By the end of this tutorial, you'll have a clear grasp of SwiftUI PreferenceKeys and the immense value they bring to your development workflow.

If you want to support my work, you can buy me a coffee :)
https://ko-fi.com/stewartlynch

Table of Contents:
0:00 Introduction
1:06 The NavigationTitle PreferenceKey
4:21 Example 1
11:04 Example 2
15:18 Example 3 - Practical Reduce Function
17:11 Example 4 - With GeometryReader

Starter Project Files:
(If you are having problems downloading zip files, use Safari. Chrome restricts zip files by default)
https://www.createchsol.com/StarterPr...

Completed Project:
https://github.com/StewartLynch/Swift...

References mentioned in video:
Custom Environment Values in SwiftUI
   • Custom Environment Values in SwiftUI  

Other References:
Stewart Lynch's YouTube Channel:
   / @stewartlynch  
Stewart Lynch on Mastodon:
https://iosdev.space/@StewartLynch
Stewart Lynch on Twitter:
  / stewartlynch  
Stewart Lynch on LinkedIn
  / stewartlynch  

SwiftUI PreferenceKeys

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

SwiftUI GeometryReader

SwiftUI GeometryReader

Николай Пучко — Эволюция презентационных паттернов SwiftUI

Николай Пучко — Эволюция презентационных паттернов SwiftUI

SQL - 21 - Built in Functions Max, Min, Sum, Avg

SQL - 21 - Built in Functions Max, Min, Sum, Avg

MatchedGeometryEffect in SwiftUI

MatchedGeometryEffect in SwiftUI

Владимир Боглаев на канале СПЕЦ: Капитуляция победителя: Мир на Украине.

Владимир Боглаев на канале СПЕЦ: Капитуляция победителя: Мир на Украине.

Основы SwiftUI | Урок 6. ScrollView, ForEach, List

Основы SwiftUI | Урок 6. ScrollView, ForEach, List

2026 – год жестких перемен. Цены сильно вырастут. Острый банковский кризис | Игорь ЛИПСИЦ

2026 – год жестких перемен. Цены сильно вырастут. Острый банковский кризис | Игорь ЛИПСИЦ

Введение в замыкания в Swift

Введение в замыкания в Swift

Проект на VIPER в Swift

Проект на VIPER в Swift

Foundation Models Framework in Swift  Getting Started with On Device AI

Foundation Models Framework in Swift Getting Started with On Device AI

Обыграешь меня — дам $1 000 000», — смеялся профи, не зная, что дочь горничной — гений

Обыграешь меня — дам $1 000 000», — смеялся профи, не зная, что дочь горничной — гений

Man in The Middle Attack and SSLPinning | Ethical Hacking | Charles | iOS | Swift | Xcode

Man in The Middle Attack and SSLPinning | Ethical Hacking | Charles | iOS | Swift | Xcode

Custom View Modifiers in SwiftUI

Custom View Modifiers in SwiftUI

Лекции

Лекции

1.  Camera Photos SwiftData: DataModel and View Setup

1. Camera Photos SwiftData: DataModel and View Setup

Законодательное ограничение C++

Законодательное ограничение C++

Swift’s Measurement API — From Miles to Meters and Beyond

Swift’s Measurement API — From Miles to Meters and Beyond

Mastering Liquid Glass in SwiftUI – Buttons, Containers & Transitions

Mastering Liquid Glass in SwiftUI – Buttons, Containers & Transitions

Приложения с 0 до AppStore. Часть 1. Верстка Макета На SwiftUI

Приложения с 0 до AppStore. Часть 1. Верстка Макета На SwiftUI

Enhancements to ScrollView in iOS 17

Enhancements to ScrollView in iOS 17

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]