How To Pass Data Between View Controllers in Swift (Xcode 11) | iOS for Beginners

preview_player
Показать описание
Passing data between view controllers is an essential part of making an app. Let's go over two different ways to pass data between controllers - through closure completion handlers and notifications.

iOS Academy offers the #1 course for iOS Development for Beginners. Learn to create iPhone and iPad apps from scratch. Everyone these days has an app idea; learn the important skill of making those apps, make yourself more marketable, change industries to get a different job, and enjoy the ride!

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

Enjoy my teaching style? Learn to build the TikTok App from scratch with my course!

iOSAcademy
Автор

Thank you. This helped me a lot with NC. The concept is simple, but I was hung up for a long time getting text out of a function on one VC and into a labels on other VCs. You made the components of the NC Post and Observer system clear.

tahevol
Автор

helpful but the zoom in feature you have when presenting is disorientating

heliumstein
Автор

i love how you explain those different method, not just like showing only the code, thanks a lot

BranGaming
Автор

Thanks for the video tutorial. The Observer was the most interesting place.

volodya-nrg
Автор

How do you manage to explain any concept with such a simplicity?

GG-hkiz
Автор

when you messed up with the button, on the OtherViewController, at first I thought I'm really lost, how is then actually possible....?

dugrut
Автор

Please upload one more video for this pass data.. Multiple labels and multiple textfields.. Data transfer and save it

BalaaLyf
Автор

Thanks A lot that is great
I have a question how to switch to other story board from NSObject class I used what you wrote but it said no present in NSObject please help me

rafatwasef
Автор

Your videos are great, but zooming so often might be little bit distracting and hard to follow. You might want to stick with one view and make the font size bigger and it will be fine. Thank you for your videos.

Christian
Автор

This doesn't seem to be working when I try to do it the other way. Push data from the first vc to the second. I am posting the notification but I have to do it before pushing the second view controller and the second vc never receives the notification.

RyeGuyWpg
Автор

i tested this on my iPhone and the keyboard doesn't dismiss, how do i dismiss the keyboard

vspianist
Автор

both method are super advanced, to be honest not suitable for newbie, only for swift experts. but thanks for share anyway

chho
Автор

That a lot bro, it is a good way for moving data from A-> B or B->A Controller.

asherazeem
Автор

For me, I am still unable to see the completionHandler in my initial viewcontroller.
The error says "Value type of 'ViewController' has no member 'completionHandler' " I have added public in front of the variable

andrew
Автор

Great Video!!! saved me, but how do you manage to do all zooms while recording? its so epic since i have bad sight, which software do you use?

LeagueRandomPlayer
Автор

What about using segues? Are segues considered outdated?

shoilett
Автор

Thanks for the excellent tutorial.

I have used the notification solution to send an object from the second to the first viewController.

But what about sending an object from the first to the second. I was setting the observer and a different notification name and pushed the second viewController on the stack by . But the notification does not get noted .

Any idea how to get the object to the second ViewController ?

PFSGMBH
Автор

how does one capture a global variable data from one view controller to another without using segue or moving to a new viewcontroller?

bearishlilly
Автор

Good tutorial! Question: using the completionHandler version, would it be possible to have the save button on vc2 make an image on vc1 switch to another image?

maryannadelman
join shbcf.ru