Use UIViewRepresentable to convert UIKit views to SwiftUI | Advanced Learning #13

preview_player
Показать описание
In this video, we will learn how to convert views from UIKit into SwiftUI. As I've mentioned before, I definitely recommend using native SwiftUI components whenever possible because they are stable and much easier to work with. However, not all SwiftUI components are highly customizable and there are occasional situations where we might want to convert something from UIKit and use it in our SwiftUI application. As you'll see, putting UIKit elements onto the screen in SwiftUI is actually pretty easy. The hard part, which we will also cover, is learning how to communicate the data flow from SwiftUI to UIKit and vice versa, from UIKit back to SwiftUI.

🤙 WELCOME BACK 🤙

Рекомендации по теме
Комментарии
Автор

Hey man, I've been working with UIKit for the past 18 months and need to learn swiftUI for a new job, and your videos are great for people that know swift but and new to swift ui. really clear and and very good examples, make me understand things that other teachers didn't explain very well. Keep it up!

noamif
Автор

UIKit works so flawlessly (I started on SwiftUI and use it when need be). I hope thats where SwiftUI grows to

ncba
Автор

Truly wonderful video. I’ve used viewrepresentables before but still learned something new. Great job Nick

cinquain
Автор

Thanks a lot! Hard at first but it all makes sense at the end.

PradeepManek
Автор

Thanks a lot! Kind of scary at first but it all makes sense.

tchendoh
Автор

I'm impressed. I'm too old for this stuff. I wish I were young. There was no OS when I was a teen.

GGGGGG-qjun
Автор

I love your content, your videos are amazing for understanding the core concepts from depth.. thank you.

simranpreetchahal
Автор

Hi Nick and firstly thanks for all that work on your channel!! May it be, that the last marker at 24:03 in 10/06/2023 now is deprecated? It says to me "Value of type 'some View' has no member 'updatePlaceholder'".
All best ✌

Edit: no, it still works (I just messed up the modifier-hierachy)

mackmelodeeofficial
Автор

Thank you very much it's an amazing explanation.

kasunjayasekara
Автор

is it worthing to write a 100 line for only a placeholder Color ! I would go with the regular swift ui one

worldofqurani
Автор

Can we use directly parent Binding inside that coordinator class instead of defining a new Binding inside it?

amirmousavi
Автор

That was really excellent and just what I needed today!

BruceCichowlas
Автор

Now my understanding is much better than before. Maybe it helps me to solve my Custom Annotation problem. 😅

marclutke
Автор

thank you, i can easily understand in a short time

JZ-xchu
Автор

Thank you for the explanation nick! Does it also work with the UIKit view gesture, for example pinch zoom

AdjieSatryo
Автор

If youtube let me like this video 1000 times - I've did it )

ShooMPozitiV
Автор

Very nice Nick! I have a need for a grid entry within a ScrollView in SwiftUI. Is that something that I can do in this same manner? Seems that getting all of the data back into SwiftUI would be a challenge (for me LOL.) I tried building a grid using a LazyVGrid with gridColumn widths assigned and it works but when I tried to allow data entry directly into the grid using a TextField in SwiftUI it does not behave very well. I have dates, Doubles, & Currency to be entered and the rows / columns become too large on a phone-sized screen. I can fill the grid with data from the users DB but data entry is clunky.

Is this how you would approach a problem like this? If so, any hints? Thanks so much for your great tutorials! I have followed every video you have published. So well done!

KimbrellBrad
Автор

KUDOS! thank you very much for sharing your knowledge. Do you intent to explain how to use "Combine" lib? much appreciate. All the best.

tmjromao
Автор

Great video!! I have a xib in UIKit with dynamic size (need to hide some content on the basis of some logic). How to make sure that in SwiftUI the frame size is updated on the basis of the content of this xib ?

cdhello
Автор

Hi Nick, Love all your videos.
New to Swift, pretty comfortable with SwiftUI (thanks to you :) ). A friend has an app written 100% UIKit, would love to help make some updates with SwiftUI but haven't figured out how to make my views work in his existing app. Example replacing the nav bar with a custom one like you showed us in a previous video.

Have you done a video or have suggestions on how migrate a UIKit project to SwiftUI? Or how to integrate the two? Would be great to keep the app alive, and integrate tab by tab, instead of writing everything from scratch 100% SwiftUI.

Any ideas are much appreciated.
Thank you!! And thank you for these videos!!

P.S.
Are you available for hire? Contract work?

istalzer
join shbcf.ru