Reactive Environment Object Application State (Ep 3 SwiftUI)

  Рет қаралды 21,232

Lets Build That App

Lets Build That App

Күн бұрын

Maps UIKit SwiftUI:
www.letsbuildthatapp.com/cour...
Fullstack Social NodeJS iOS HTML:
www.letsbuildthatapp.com/cour...
AppStore JSON APIs
www.letsbuildthatapp.com/cour...
Tinder Firestore Swipe and Match
www.letsbuildthatapp.com/cour...
Podcasts Course
www.letsbuildthatapp.com/cour...
Facebook Group
/ 1240636442694543
Completed Source Code
www.letsbuildthatapp.com/
Instagram: / buildthatapp
Twitter: / buildthatapp

Пікірлер: 50
@xxfkee
@xxfkee 4 жыл бұрын
I learned a lot. Many thanks for this tutorial on Environment Objects!! Now I am not any more troubled by how to structure the chaining of data transfer/reference among the views. Environment Objects made my codes much simpler and easier to review later on.
@placideirandora7405
@placideirandora7405 4 жыл бұрын
Thank you for continuing. It's so helpful for iOS development beginners like me.
@JJ-fr2ki
@JJ-fr2ki 3 жыл бұрын
Solution: For everyone now using SwiftUI2.0 for Xcode 12.0, here's how to get similar environment variables to work without catastrophic threading errors. Note SwiftUI 2.0 for Xcode 12.0 SwiftUI projects do not use nor generate SceneDelegate.swift files. Voong's dated video shows one is required to change this file to avoid threading errors. To avoid a threading error, follow Voong's directions EXCEPT instead of changing the non-existent SceneDelegate.swift go to the new "main file" called YourProjectAPP.swift and add the following: import UIKit //possibly optional import SwiftUI @main struct ProtoTimer3App: App { var body: some Scene { WindowGroup { ContentView().environmentObject(GlobalEnvironment()) //CRITICAL!!! } } }
@Sollica
@Sollica Жыл бұрын
I am actually coding on iPad and was trying to find a workaround but couldn’t, you’re sooooooo helpful! Thank you!
@monicasimonyan1328
@monicasimonyan1328 Жыл бұрын
Omg this comment was life saving
@rickisyourbro
@rickisyourbro 4 жыл бұрын
nice tutorial! happy chinese new year Brian!
@Omeir34
@Omeir34 4 жыл бұрын
Always up for a Brian video!
@rabbit_on
@rabbit_on 4 жыл бұрын
Waiting for continuing. Thx.
@ecptavares
@ecptavares 4 жыл бұрын
Good as always thank you Brian.
@thebest-yp9xe
@thebest-yp9xe 4 жыл бұрын
You can get the divide (÷) symbol from the Emoji & symbols it's on the top right. left to WiFi or in the keyboard settings, Also I'm waiting for another video how to actually make the calculator work, great videos
@sosumee
@sosumee 4 жыл бұрын
also waiting for a video to make the calculator work, if you want this pleas like this comment so it goes to the top
@TrueNorthStephen
@TrueNorthStephen 4 жыл бұрын
I think it would be good practise to try to make the calculator work by yourself instead of waiting for a video to drop. You will have a better understanding of how swiftui works by coding this part yourself. I was able to do it by changing the code a little and i have no experience using swiftui. Fwiw I used alot of stackoverflow to help debug my code whenever i ran into issues.
@MariusVideoTuts
@MariusVideoTuts 3 жыл бұрын
also, you can get it with "Option + /"
@jkristia2011
@jkristia2011 4 жыл бұрын
great starter tutorial on SwiftUI
@jamilamini7807
@jamilamini7807 4 жыл бұрын
you helping a lot great videos
@readmoreapp
@readmoreapp 2 жыл бұрын
As always, thank you for easy explanation :) Love from India
@alekseysoldatenkov5675
@alekseysoldatenkov5675 4 жыл бұрын
Two days too late, I just dove into this! It's like a redux store, or an off-shore bank, for laundering all the variables/money you need.
@abhishekbinniwale6145
@abhishekbinniwale6145 4 жыл бұрын
waiting for next video that how actually will make the calculations . And how we will handle the last typed number / last calculation and does next calculation on that .
@chudq
@chudq 4 жыл бұрын
I am not sure if I understanding is correct: 1. Define an environment variable in root class; 2. Use the same environment variable name in all sub-SwiftUI views; and 3. Initiate the environment variable in root class when it is created. Then any changes in env variable will be reflected in SwfitUI views.
@pankajkainthla
@pankajkainthla 3 жыл бұрын
Where is the next calculation part?
@hoadambutxinh
@hoadambutxinh 3 жыл бұрын
you really cool, thanks so much for solve my bit problem with @enviromentObject.
@user-cq7yb8us3o
@user-cq7yb8us3o 4 жыл бұрын
Thank you so much 😊 So cool 😎
@raquelaranda6687
@raquelaranda6687 4 жыл бұрын
Muchas gracias. Soy novata en programación y estoy aprendiendo mucho contigo. Sólo aprendo por gusto. Espero con ilusión el siguiente capítulo. Gracias de nuevo.
@technooblogy
@technooblogy 4 жыл бұрын
You can get the divide (÷) symbol easy with the quick kb shortcut: Option + /
@rayanshgupta3202
@rayanshgupta3202 3 жыл бұрын
Thanks
@Music-gn1xe
@Music-gn1xe 4 жыл бұрын
perfect .. thank you
@nikhilnangia85
@nikhilnangia85 4 жыл бұрын
I am new with RxSwift, but would it be a nice to go with RxSwift at current time or shall we start learning reactive components in swiftui for better future perspective?
@smackaroony
@smackaroony 4 жыл бұрын
super duper vid
@tannerrozier
@tannerrozier 4 жыл бұрын
Sorry to post this here, but I just watched your Kotlin videos and I am struggling to use picasso to load images from my assets folder, seems like it should be really simple, but I've had no success after hours of trying. I can't comprehend that it'd be easier to load files from the internet than your own device! Also, thanks for all your videos, I have already completed an iOS app that I've made a few hundred dollars off so far haha
@joeymorque1743
@joeymorque1743 4 жыл бұрын
Pls do ep 4 😊
@kevinprandini
@kevinprandini 2 жыл бұрын
Hey have loved the three tutorials untill here will you be making a follow up video??
@juanur1990
@juanur1990 2 жыл бұрын
how do I get the delegate app thing?
@enattudurai
@enattudurai 4 жыл бұрын
i want to render SWIFT UI controls dynamically using the JSON data. on the JSON i can define different controls and swift UI needs to render depends on my JSON. will this posisble?
@LetsBuildThatApp
@LetsBuildThatApp 4 жыл бұрын
This is always a bad idea and I recommend against it.
@sonalikulkarni2938
@sonalikulkarni2938 2 жыл бұрын
When will you give how to calculate numbers man
@TheseEyesSeeDarknessClearly7
@TheseEyesSeeDarknessClearly7 Жыл бұрын
Where’s the part where we actually do calculations??
@Raahim
@Raahim 2 жыл бұрын
eps 4?
@gabrielrml
@gabrielrml 3 жыл бұрын
where is E4 please
@legm8034
@legm8034 4 жыл бұрын
Wow he build a calculator awesome!!
@JJ-fr2ki
@JJ-fr2ki 3 жыл бұрын
Solution in replies. Threading error now back, and program fails as of Sept 2020, because Swift Apps don't produce a SceneDelegate.swift file anymore and this must be modified according to video. Anyone know what to do now to avoid threading error?
@LetsBuildThatApp
@LetsBuildThatApp 3 жыл бұрын
I do suggest writing your own environment object code first before trying this. Its actually dead simple once you get an example working.
@JJ-fr2ki
@JJ-fr2ki 3 жыл бұрын
@@LetsBuildThatApp I have, thanks. But, what modification should we make if we want to adapt your otherwise excellent video to the new version of SwiftUI? As you may know there is no SceneDelegate.swift file anymore, instead a "main" file named after the app. I think for this video and the course it advertises to stay relevant it would be helpful to me and you audience if described or linked to the new change that needs to be made to stop threading errors--the one analogous to your SceneDelegate.swift file change.
@JJ-fr2ki
@JJ-fr2ki 3 жыл бұрын
Solution: For everyone now using SwiftUI2.0 for Xcode 12.0, here's how to get similar environment variables to work without catastrophic threading errors. Note SwiftUI 2.0 for Xcode 12.0 SwiftUI projects do not use nor generate SceneDelegate.swift files. Voong's dated video shows one is required to change this file to avoid threading errors. To avoid a threading error, follow Voong's directions EXCEPT instead of changing the non-existent SceneDelegate.swift go to the new "main file" called YourProjectAPP.swift and add the following: import UIKit //possibly optional import SwiftUI @main struct ProtoTimer3App: App { var body: some Scene { WindowGroup { ContentView().environmentObject(GlobalEnvironment()) //CRITICAL!!! } } }
@LetsBuildThatApp
@LetsBuildThatApp 3 жыл бұрын
Yeah, would you like to make a medium post so that I can link to it?
@JJ-fr2ki
@JJ-fr2ki 3 жыл бұрын
@@LetsBuildThatApp Feel free to post it yourself or amend the video description. I'm a bit busy, don't need credit, and this is a tiny helpful hack, not worthy of a Medium post IMHO.
@RupeeInc
@RupeeInc 4 жыл бұрын
CalculatorButotnView
SwiftUI Calculator - Master Stacking (Ep 1)
12:40
Lets Build That App
Рет қаралды 47 М.
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 7 МЛН
The child was abused by the clown#Short #Officer Rabbit #angel
00:55
兔子警官
Рет қаралды 22 МЛН
Was ist im Eis versteckt? 🧊 Coole Winter-Gadgets von Amazon
00:37
SMOL German
Рет қаралды 29 МЛН
I’m just a kid 🥹🥰 LeoNata family #shorts
00:12
LeoNata Family
Рет қаралды 20 МЛН
Swift API Calls for Beginners (Networking) - Async Await & JSON
25:35
SwiftUI: Presenting Modals and Bindings with Callbacks
25:17
Lets Build That App
Рет қаралды 25 М.
State Managers Are Making Your Code Worse In React
13:33
Web Dev Simplified
Рет қаралды 162 М.
SwiftUI: UIImagePickerController with UIViewControllerRepresentable
21:14
Lets Build That App
Рет қаралды 18 М.
5 Tips For Object-Oriented Programming Done Well - In Python
16:08
Why didn't the Angular team just use RxJS instead of Signals?
8:15
Joshua Morony
Рет қаралды 87 М.
SwiftUI: Facebook Complex Layouts - Horizontal Scroll View
32:54
Lets Build That App
Рет қаралды 54 М.
SwiftUI: CalculatorButtons with Enumeration and Switches (Ep 2)
19:02
Lets Build That App
Рет қаралды 23 М.
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 7 МЛН