Тёмный

Adapt for Dark Mode in SwiftUI project | Bootcamp #44 

Swiftful Thinking
Подписаться 50 тыс.
Просмотров 18 тыс.
50% 1

In this video we will learn the basics of how to adapt our iOS application to support both light and dark mode. When switching between these modes, the main consideration as the developer is the colors in your app. As you will see, some colors are adapting (will change) by default, while other colors will remain static (unchanged). By the end of this video, you will understand how to properly use these colors and how to create custom colors that will adapt to light/dark mode automatically. We will implement custom global adaptable colors (by using the Assets.xcassets folder) as well as local adaptable colors (by using the ColorScheme Environment variable).
Next video: • Adding markups and doc...
Last video: • Create a tab bar with ...
🤙 WELCOME BACK 🤙
WEBSITE: www.swiftful-t...
DISCORD: / discord
GITHUB: github.com/Swi...
SAY THANKS: www.buymeacoff...

Опубликовано:

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 31   
@williamwildsmith5162
@williamwildsmith5162 2 года назад
Hi Nick. You have a talent for this. . . you teach in bite sized chunks. Really great, and valuable to me. Thank you!
@DannyBoy443
@DannyBoy443 2 месяца назад
This is really cool to finally see how it's made. The only thing missing Nick could've added is a toggle button between the two.
@coffeeCatPeanutDust
@coffeeCatPeanutDust 3 года назад
As always, an excellent video! Thanks Nick
@SwiftfulThinking
@SwiftfulThinking 3 года назад
Thanks again Luke!
@ashtonc1
@ashtonc1 3 года назад
Very straight forward video. I will definitely be checking out some of your other videos.
@SwiftfulThinking
@SwiftfulThinking 3 года назад
Hi Ashton, Welcome to the channel! My playlists are meant to make learning Swift+SwiftUI as easy and fast as possible. My recommendation is to watch the playlists in order because each video will build on top of previously covered material! Let me know if you have any questions :)
@AZMerf
@AZMerf 3 года назад
The whole series is fantastic. Do them all! :)
@oleksiileshchenko823
@oleksiileshchenko823 2 года назад
Love your series. Keep it up, man
@jay.rhoden
@jay.rhoden 3 года назад
These videos are great, thanks for making them. The content starts at 2:00
@grapejuice04
@grapejuice04 2 года назад
ColorScheme is pretty cool! Thanks brother
@JeckyKA
@JeckyKA 3 года назад
great video, thank you so much!
@magedmohmed4403
@magedmohmed4403 2 года назад
Thank you Nick
@radfaredu644
@radfaredu644 Год назад
Thank you Teacher!
@CryptoSimplifiedTutorials
@CryptoSimplifiedTutorials Год назад
Sweet!
@shenghaoxu9925
@shenghaoxu9925 2 месяца назад
still helpful in 2024
@kurtschmucker4229
@kurtschmucker4229 2 года назад
A "globally adaptive" approach to colors seems both cleaner and easier to use than "locally adaptive". Why would "locally adaptive" ever be used?
@SwiftfulThinking
@SwiftfulThinking 2 года назад
The two main use cases would be (1) if your using a theme of colors that aren’t stored in the Assets folder, or (2) if you want to override a globally adaptive color. Maybe it normal turns green and in this case u want blue. But generally, yea the global ones are preferred
@y.v.8803
@y.v.8803 7 месяцев назад
Can you do a video on @environment and CGFloat? They have been mentioned in videos recently and I am not sure what they are.
@knowledgeispower4953
@knowledgeispower4953 8 месяцев назад
Are u great ..bro 🤩
@akbar41
@akbar41 Год назад
Funny-the terniary operator has been around for almost 50 years It was always just a shortcut SwiftUI has seemed to promote it to almost a necessity!
@rayhaanalykhan
@rayhaanalykhan 9 месяцев назад
Nice observation, true.
@randlyce
@randlyce 3 года назад
great
@SwiftfulThinking
@SwiftfulThinking 3 года назад
Thanks Arman!
@coffeeCatPeanutDust
@coffeeCatPeanutDust 3 года назад
Nick, is it at all possible to share the xcode project you have for the beginner bootcamp? I encountered a issue on my mac around video 34 and couldn't recover my xcode training files. Thanks
@SwiftfulThinking
@SwiftfulThinking 3 года назад
Hey Luke! The source code for all of my RU-vid playlists is available on my GitHub: github.com/swiftfulthinking
@coffeeCatPeanutDust
@coffeeCatPeanutDust 3 года назад
@@SwiftfulThinking Legend! Thank you so much. Can't say how much I'm enjoying the series. I have a flip calendar and I cross off 1 video a day. I'll buy you another coffee for your efforts ;)
@Nunny25
@Nunny25 3 года назад
Nice tutorial. I found, that You example works perfectly in simulator, but not on real device. In dark mode, globally adaptive color stay green, not yellow. Very confusing.
@SwiftfulThinking
@SwiftfulThinking 3 года назад
Hmm that doesn't sound right. Maybe you need to restart the app when you switch? They should be working in both modes, although we didn't add code for it to change while the app is already open.
@Nunny25
@Nunny25 3 года назад
@@SwiftfulThinking When You restart app, the result is the same. I found the same problem, when I made my own app. Everything is correct in simulator, but not on device. Didi You test it on the real phone?
@rudolphhock1155
@rudolphhock1155 2 года назад
Is the Ternary operator the coded version of AdaptiveColor ?
@rayhaanalykhan
@rayhaanalykhan 9 месяцев назад
Ternary operator are just condition, you can put any condition using ternary operators eg: if 1==1 { print("1 is equal to 1") } else { print("1 is not equal to 1") } you can write this as: 1 == 1 ? print("1 is equal to 1") : print("1 is not equal to 1") Similarly in this video nick use ternary operator to set the color, you can say that, but ternary operators are much more than that.
Далее
How to ACTUALLY LEARN SwiftUI in 18 MINUTES
18:26
Просмотров 3,5 тыс.
У КОТЕНКА ПРОБЛЕМА?#cat
00:18
Просмотров 979 тыс.
skibidi toilet multiverse 042 Trailer
01:57
Просмотров 1,3 млн
这位大哥以后恐怕都不敢再插队了吧…
00:16
iOS Developer 2023 Roadmap to GET A JOB
11:13
Просмотров 96 тыс.
Play: The Secret Weapon for iOS Devs & Designers
10:12
How to use NavigationStack in SwiftUI | Bootcamp #62
23:59
React visually explained: 'use client'
15:57
Просмотров 42 тыс.
У КОТЕНКА ПРОБЛЕМА?#cat
00:18
Просмотров 979 тыс.