Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8415285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:24:06+00:00 2026-06-10T01:24:06+00:00

I want to send data back to my main view when popping -(IBAction)addPartToBuild:(id)sender{ [self.navigationController

  • 0

I want to send data back to my main view when popping

-(IBAction)addPartToBuild:(id)sender{
    [self.navigationController popToRootViewControllerAnimated:YES];
}

Could I use sender:data? I tried but I got a “No @interface” error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:24:08+00:00Added an answer on June 10, 2026 at 1:24 am

    You are trying to mess up the MVC (Model View Controller) philosophy, the view controller must be responsible for the UI handling.

    You need to build the data-model and the data-controller responsible for the data storage. Then you can add notifications or delegate the data-change events to your root or any other view controller, that would be easy to read and you’ll get all the MVC benefits.

    That must be as easy as

    [[MyDataManager sharedInstance] addPartToBuild:newPart];
    [self.navigationController popToRootViewControllerAnimated:YES];
    

    And the root view controller should either catch the data-change notification, delegated message or just the UI completely every time it’s shown taking the changed data from your data controller.


    Might have misunderstood the question, if you need to know which control has triggered the action, the id sender is that control reference, e.g. if you link the action to the UIButton the sender will be UIButton reference (you can check it with [sender isKindOfClass:[UIButton calss]] and then get any needed property of the UIButton like you can assign the same action for several buttons and check the button tag to decide what to do, check the Mediator pattern for details).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello i need to send some data back to the server and i want
I want to open a configuration screen and send back its data when user
I have two C# programs and I want to send some data back and
Is there any way to have a subroutine send data back while still processing?
I want to send some data to an Arduino through pyserial in Python. All
I'm using Node.js and I want to send back multiple responses to the client.
I am trying to send a JSON data to a Sinatra app by RestClient
I have a view based app (not navigation or tab based...) My main view
I have a short question. How can I send data from an activity to
how can i send message back to the browser or localhost for example if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.