Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 184.108.40.206 release ready!
So let’s assume you have two view controllers: FirstViewController and SecondViewController. The user navigates from FirstViewController to the SecondViewController. SecondViewController will process some business logic and the result of that business logic will need to be sent back to the FirstViewContoller when the user navigates back.
Here I’m using the call back for sending data back from SecondViewController to FirstViewController.
-> Callbacks are very important when we are doing any asynchronous task in the background and need to change the UI based on the response.
First, we make the call back in SecondViewController.
here this callback returns void means nothing.
We will Navigate from FirstViewController to the SecondViewController. here we are using below code to push from FirstViewController to the SecondViewController.
Now we will call callBack from SecondViewController when the user press on the back button.
In this step, the callback block will execute and print the data.
So pls follow the above step and And if you have any issue or suggestion you can leave your message in the comment section I will try to solve this.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.