Excellent job. I have been all over the internet looking for good example of how to set up a segue to another ViewController and wasn't having any luck until I came across your quick tutorial. Excellent explanation and easy to follow. This is the second time you've rescued me today! Thanks!
@gjermundification6 жыл бұрын
I have now watched 3 of your videos, I find that you are very good at grasping the essence of your topic and you are really good at not derailing your topic.
@kasiabialostocki6997 жыл бұрын
For an utter noob, you make learning to code fun and easy. You are an awesome teacher!
@1TheSwiftGuy7 жыл бұрын
Thank you, super glad to hear that!:)
@timmy3347 жыл бұрын
Thanks! I getting into iOS development and your tutorials are always helpful and concise. This is a good one.
@1TheSwiftGuy7 жыл бұрын
Thank you!:)
@nooral-awadi95265 жыл бұрын
Thank you so much! Short and to the point. Please keep posting great content on Swift
@chopchopcuts19027 жыл бұрын
0:27 What an emphatic keyboard press!! Great tutorial!
@1TheSwiftGuy7 жыл бұрын
haha, thank;)
@andyal8685 жыл бұрын
It helps to watch it twice. In general, many videos I get on a second try. He explains pretty good though
@azevedo1236id7 жыл бұрын
congratulations man, i am from brazil and here we has a very limited videos about swift, but yours videos are great, very simples and quick!! keep doing this !!
@bigmtnstudio7 жыл бұрын
Quick and simple! I like that. Thanks, Swift Guy!
@1TheSwiftGuy7 жыл бұрын
Thank you for your comment Mark! Love watching your videos!:)
@bigmtnstudio7 жыл бұрын
Wow, that's awesome. I love your channel, love your enthusiasm for programming!
@1TheSwiftGuy7 жыл бұрын
Thank you, I appreciate you saying that!:)
@Lelvl87 жыл бұрын
Mark > TSG, Yeah sry bro :) liked
@GruntyGunner6 жыл бұрын
1:52 I just wanted to point out that dragging a segue from back to the previous VC is generally not recommended and that you should use an unwind segue instead. I know you probably know this and it's fine for this tutorial but just wanted to clarify for people brand new to Xcode.
@agustinachaer7 жыл бұрын
great video! The only thing that I would change is the use of a show segue to go back. I know that probably for simplicity purposes you did it that way here but it is not a good practice at all. In this example you are stacking those view controllers one over the other repeatedly and never dismissing them. I don't know if it maintains multiple instances of the same view controllers so starts to take up a lot of space or if a new instance of a viewcontroller is created, the previous one of that same viewcontroller is destroyed. In any case, it is not a good practice therefore you should not be doing it in a tutorial without explaining that it should not be done cause beginners pick up on everything you teach. Yaser's implementation of the back button is the correct one. BTW recently I had to implement a custom transition for a segue cause i wanted it to slide in from the left and be dismissed to the left too and I though of it to be very interesting.
@statsbruh7 жыл бұрын
good catch
@frankdragon7 жыл бұрын
Hey man really good videos! Shorts , meaningful and touching a lot of topics
@1TheSwiftGuy7 жыл бұрын
Thank you so much for your comment!:)
@dianewarde60746 жыл бұрын
That should say “trying to learn to code. Thanks for all your helpful tutorials.”
@arad9076 жыл бұрын
As Mark said, quick & simple & great... Thanks.
@DarylNotDead6 жыл бұрын
Hi. In the “sending” view controller when setting your var, you could try logic testing. Something like- If mystring “” then mystring =mystring In theory when the sending controller is recalled it will keep the data as is if it is not “”. That may work.
@aybarslan5 жыл бұрын
Its also works on swift 4 xcode 10 Great Job !
@akshaydewan56084 жыл бұрын
this video was a great help!
@khaabd89167 жыл бұрын
Your tutorial is amazing please keep going
@1TheSwiftGuy7 жыл бұрын
Super glad to hear that!:)
@GunnarDeMinecraft6 жыл бұрын
Great, quick video!
@webmasterashishgaur6 жыл бұрын
you are not guy, you are the best swift guy
@yaserbinabdullah39007 жыл бұрын
Thank you man, for this amazing tutorial. However, you forgot the back button but I did it for you and for you guys @IBAction func back(_ sender: Any) { dismiss(animated: true, completion: nil) } I have called the button (back) then I used dismiss code to return to the same page without losing the data. which that keep free space in the RAM of the phone. keep up
@yaserbinabdullah39007 жыл бұрын
if you want to have a new page to enter new text just connect the button to the firstViewController without the code that I have provided before
@1TheSwiftGuy7 жыл бұрын
thank you for your contribution Yaser!
@yaserbinabdullah39007 жыл бұрын
You are welcome
@papii_66696 жыл бұрын
Yaser Abdullah I noticed he forgot it too but then I realized that he did a simple seg for it :)
@Zo917096 жыл бұрын
Yaser - is this what i would do if i needed the data from the second view controller save and displayed back on the first view controller?
@catcatcatcatmeow6 жыл бұрын
Thanks, I'm super new to swift and this tutorial is neat and amazing, it helps a lot :)
@shoukimichaelsouri72517 жыл бұрын
Love these quick tutorials!! Have a quick question. How could you pass a variable from firstViewController to a thirdViewcontroller without a direct segue from the first to the third with a flow like this first-->second-->third, each with a segue to the next?
@pravishankar6 жыл бұрын
Great tutorial - Am following these steps to pass an array between viewcontrollers...do you have a video for that?
@QAInsights7 жыл бұрын
Thanks for the tutorial. How to pass data from VC A to B to C? Please help me out.
@prithviapportunity73746 жыл бұрын
Awesome dude!! simple to understand.
@BernaLuz5 жыл бұрын
Absolutely useful and easy. Thank you.
@BlaBla-dw9mg6 жыл бұрын
Thank you for your amazing tutorials.
@francescomusto49186 жыл бұрын
Hi Swift Guy. This is my first time in your channel. But I have a big question about passing data between View Controllers. There is a simply way to make two View Controllers communicate without a direct link but through a TabBarController and a Navigation Controller? Thanks a lot!
@ricardoisidro76406 жыл бұрын
Nice example, man. It was really helpful for start, but now I wanna now what happens if I have more than one viewcontroller (suppose a form splitted in two viewcontrollers). Do I need to add a segue among each viewcontroller and the final VC? Thanks a lot!
@eyerusalemwoldu21447 жыл бұрын
Thank you, It is very informative and simple!!!
@1TheSwiftGuy7 жыл бұрын
Glad to hear that!:)
@oscarlofqvist2406 жыл бұрын
Thank you, Swift Guy, great video! I have a question is this a safe way to pass data? Like a user email or password?
@Adamzdsad7 жыл бұрын
Hello , i have a question which im hoping you could answer. I am building a restaurant application, and was wondering what would be the best way for me pass on order information from a "restaurant menu" view to the "checkout" view e.g. User selecting Cheese Burger x1 from menu > Then pressing add item . Love your vids by the way, learnt so much :)
@bigmtnstudio7 жыл бұрын
Amzkeh, you could use the same concept Swift Guy uses. Except instead of a string you could create your own struct/class to hold orders like: class Orders { var itemID = 0 var itemName = "" var itemCount = 1 } Then you just have an array on the menu page: var orders: [Orders] = [] Append items to this array and when the user taps "Checkout" you pass that variable "orders" to the checkout viewcontroller!
@nouraalfaris17787 жыл бұрын
thank u fro the fantastic Video i want to ask u about if i want to move data was retrieved from DB then i want to store it again with other View i will store data inside it into database how can i do that ?
@guillermocast017 жыл бұрын
Great video! Thanks Bud, really appreciated.
@1TheSwiftGuy7 жыл бұрын
:)
@mohamedsudheer91636 жыл бұрын
Ppl like The Swift Guy will go to iOS heaven edit: helped me solve a similar problem to the one shown in the video
@carlomagnocondesaldana58606 жыл бұрын
Simple and great. Thanks brother!
@carlosfernandez64707 жыл бұрын
Thanks quick and easy .. love it
@searchingwhat68356 жыл бұрын
Great tutorials dear keep it up thanks for this wonderful tutorials
@AbdullahJirjees5 жыл бұрын
Sir thanks a lot to your video, I modified it by making the seondViewController to be TableViewController, but I faced this issue with the label, I cannot figure it out "Main.storyboard: error: Illegal Configuration: The label outlet from the TableViewController to the UILabel is invalid. Outlets cannot be connected to repeating content."
@tubex13006 жыл бұрын
Hi It's really save a lot of time Many thanks for this wonderful vid
@fraiserroberts69107 жыл бұрын
Thankyou for the video, just wondered is there a way to pass data, so that I can pause audio using a button on a different view controller?
@1TheSwiftGuy7 жыл бұрын
What you could do, is create an extension to your view controller, in which you create your audio player. That way the audio player will be accessible throughout all of your view controllers. You will then also be bale to pause it;)
@SurendraKumar-si8lw7 жыл бұрын
Use protocal and delegate method. create protocal of BUtton View Controller and implement delegate in Audio View Controller.
@ArtemLebedko6 жыл бұрын
Briefly and clearly Thank you buddy :3
@ismael71556 жыл бұрын
Thanks! Keep up the good work!
@youngdomsey6 жыл бұрын
Thats an amazing tutorial! Thank you!
@Peech6 жыл бұрын
How can I make the text that we inputted in the TextField remain in the label even when you close the app entirely?
@studentprogrammer91157 жыл бұрын
hey this is help helpful, but is there a way I can send the date from a UIbutton(which was tittleselected from a picker view) to a label in another VC?
@1TheSwiftGuy7 жыл бұрын
Yes, make sure to take a look at my video on how to use multiple view controllers!:)
@PeterSchimpl7 жыл бұрын
Great stuff - thanks for sharing!
@goktugguvercin80697 жыл бұрын
Your tutorials show us how we can send data from first view controller to second view controller. In other words, this is forward data transferring. Is there a tutorial of how we can take data from second view controller to first view controller ? My aim is taking data from second view controller and add it into a table view in first view controller.
@abdulrahmanalshamrani17657 жыл бұрын
You are amazing teacher ^_^
@1TheSwiftGuy7 жыл бұрын
Thank you!:)
@BalaaLyf4 жыл бұрын
Please upload one more video for this pass data.. Multiple labels and multiple textfields.. Data transfer and save it
@mikefrank26434 жыл бұрын
How would it be for the saved data to be seen in several viewcontrollers without using segue ???
@jacksonrogers21476 жыл бұрын
Would I be able to do something with this technique when taking a variable from a text field and then simultaneously putting it into multiple tabs of a tabbed project (i.e. one with a table view, one with a map, one with a summary)?
@carrot71436 жыл бұрын
Thanks for the tutorial! But I was wondering how can I retain the data that was entered in the first view controller. So when i return to that view controller the we previously entered in the text fields are unchanged?
@nicolasthevenard19137 жыл бұрын
I love you tutorial, thank you
@1TheSwiftGuy7 жыл бұрын
Glad to hear that, you are welcome!:)
@olivierdumont92236 жыл бұрын
Heyp, so easy!!! Many many thanks Seb! :-)
@papii_66696 жыл бұрын
Great job bro
@Zo917096 жыл бұрын
Nice video- what if i want to send the data entered in the second view controller- back to the first. For example- say once you type your name and push enter in the first view, it pushes the data to the second view- however, once you're on the second view and you push save - it automatically goes back to the first view, and the name you entered is automatically saved. Please let me know if you have a solution. Thank you the Swift Guy!!
@tdrusk7 жыл бұрын
Thank you thank you thank you!
@1TheSwiftGuy7 жыл бұрын
You are so welcome!:)
@McD87 жыл бұрын
Just one question: how would you do this with a tab interface? I would like to enter text in one tab and have it effect a label in another tab. Thanks!
@raven31076 жыл бұрын
Can you make a video on Arrays?
@الياسيولأمل7 жыл бұрын
Hello Can you explain to me how to fetch a record from a permanent store using the search tool
@saikrishna05127 жыл бұрын
can we do the same with storyboards??
@ilanepena76615 жыл бұрын
Hey nice video but I'm trying to do the same by passing doubles and then add these numbers to others but it doesn't work it says Binary operator '+=' cannot be applied to operands of type 'String' and 'Int'
@warmachine30717 жыл бұрын
Thanks so much bro!!
@1TheSwiftGuy7 жыл бұрын
You are so welcome brother!:)
@rahulnetha31906 жыл бұрын
how long will the data will be saved ?
@רוןאבות6 жыл бұрын
Thank you! very helpful
@marianagrnk3 жыл бұрын
I need to pass an array of data from the 1st to the 4th view controller, I tried this way but doesn’t work for me cause the views are not directly connected. Any help I could get pleaseeee?
@renederv5 жыл бұрын
Hey What do I need to change from this video I’ve learned if i dont want to switch to the other ViewController immediately after clicking on Enter. So when i click Enter i stay on the first ViewController and dont switch to the second? Thanks :-)
@jrgibson6 жыл бұрын
How do you pass data from ViewController A to B and then the same data to ViewController C?
@awadsandal61876 жыл бұрын
guess what u r simply amazing
@ktmman15037 жыл бұрын
Hi, did you get my email about the Apple Nav.. wont work with versions less the 10.X .. help please... Craig.
@1TheSwiftGuy7 жыл бұрын
Replied;)
@elitiauniverse28714 жыл бұрын
Thank you ^^
@bellekiller7 жыл бұрын
well, a confusion here. the seguway thing, is it a built in name or a name you made up.....?
@SullyGamer177 жыл бұрын
Could you do a tutorial on custom segues please!
@mirsaelenaalvarez38176 жыл бұрын
Hola, Muchisímas gracias!!
@lukee3867 жыл бұрын
Are you doing anymore 'i test your apps'??
@1TheSwiftGuy7 жыл бұрын
My goals is to get the next one out on Friday!:)
@lukee3867 жыл бұрын
The Swift Guy nice! Thanks. I left a link to my app in the last I test your apps video
@GarryFanata7 жыл бұрын
Why did you put the segue on the view controller and not on the "enter" button
@1TheSwiftGuy7 жыл бұрын
I would take a look at this video. In it, I explain the different types of segues, and why you use one over the other:) How To Trigger A Segue In xCode 8 (Swift 3.0)
@dianewarde60746 жыл бұрын
Swift Guy, your tutorials are very clear. However I am getting a “expected declaration” error when I type the line label.text = myString. I am using different names for the label and string, but I have checked and double checked the spelling and capitalization for correctness. I can’t find anything on the net that deals with expected declaration for such simple code. Any ideas? I am a retired person trying to learn to nos for all your helpful tutorials.
@joenaveau5 жыл бұрын
You have to write your code in a function. It can be the override func viewDidLoad() in the ViewController class, among others. it's 10 months later, I don't know if this is still relevant or not! :)
@LebenWerden6 жыл бұрын
hello. i Have a Question in 4:45 Why we don^t fill our Outlet named label ?
@warmachine30717 жыл бұрын
how would i make it so when the user comes back their username stays the same and it starts on the secondviewcontroller when you launch the app?
@jessica66126 жыл бұрын
Nice and simple tutorial. But you shouldn't be linking your second view to the first view like you did. You have to dismiss the second view when you click the "back" button, otherwise you will have many instances running on the background, and depending on the app, that will slow down the process.
@xXXDgrayManXXx144 жыл бұрын
what happens if you want to pass a function or a dictionary ? @The Swift Guy
@javiergutierrez58335 жыл бұрын
Thanks!
@rishavbhowmik7577 жыл бұрын
Can you make a tutorial on OS_Log
@perezwillie-nwobu32697 жыл бұрын
Can you permanently save it in an array of another view controller?
@perezwillie-nwobu32697 жыл бұрын
How do you do that? I tried using userdefaults.standard. but Iit didn't work. don't know if I did it right, any ideas Tiffany?
@SurendraKumar-si8lw7 жыл бұрын
if you saving Data permanently, means you are not passing data OR no need to pass data then. just save value using userdefauts in firstViewControoler . ans I secondViewController just retrive default Value and save some varibale like array.
@perezwillie-nwobu32697 жыл бұрын
well it kinda didn't work for me. my array in the second viewController is in a global variable
@manuelponce15685 жыл бұрын
dope! thanx
@1TheSwiftGuy5 жыл бұрын
;)
@intellectlogic997 жыл бұрын
unable to do it getting this error Use of unresolved identifier 'segue' on this line if let registration_otp = segue.destination as! registration_otp
@alidhan12996 жыл бұрын
Thank you
@EzDoesntExist6 жыл бұрын
thanks!
@LebenWerden6 жыл бұрын
And no unWind ?
@donk72837 жыл бұрын
wondering if anyone knows a way to send multiple text field over to there own separate label in the next view controller?
@LebenWerden7 жыл бұрын
2:22 You take a Cocoa Touch file. Why not a swift file?
@shawntaylor95097 жыл бұрын
Create a Swift file and see the difference.
@studentprogrammer91157 жыл бұрын
Ok I got that, But I’m stuck to sending data from a tableview(consist of array) to a label any help.. even my TAdon’t know how to do that 🤦🏾♂️
@1TheSwiftGuy7 жыл бұрын
Hi, do you want to print the information of the whole tableview into a label, or just the value that the user tapps on in the table view?
@studentprogrammer91157 жыл бұрын
Just the value the user click on.. 👌🏿 damn Man U got that so easily, when my TA took 2 hours to understand just the question. Smh 🤦🏾♂️
@1TheSwiftGuy7 жыл бұрын
Haha;) Have you taken a look at this video? This should explain how to go about doing it:) kzbin.info/www/bejne/d2e6nWuviNeCkKs
@SurendraKumar-si8lw7 жыл бұрын
By the way . what is TA means ? :D
@studentprogrammer91157 жыл бұрын
Teacher Assistant lol
@MusikRey7 жыл бұрын
Thanks you (y)
@1TheSwiftGuy7 жыл бұрын
You are welcome:)
@jiyoo57676 жыл бұрын
500th like!
@kamilpetryczkiewicz17007 жыл бұрын
I get the signal sigabrt ;( why?
@younessaitouaddi22685 жыл бұрын
nice
@khaabd89167 жыл бұрын
millions of likes ()
@1TheSwiftGuy7 жыл бұрын
haha, thank you
@libvlog22647 жыл бұрын
hey the swift guy where u stay?
@1TheSwiftGuy7 жыл бұрын
Denmark;)
@bellekiller7 жыл бұрын
it's like naming a function function....
@1TheSwiftGuy7 жыл бұрын
haha, I dont quite remember the video, but I guess you are right:) I would give it a different name