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

  • SEARCH
  • Home
  • 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 1030533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:42:55+00:00 2026-05-16T12:42:55+00:00

I have a label on my main View. I have a button which brings

  • 0

I have a label on my main View. I have a button which brings me to another view. On it I have a button to change my label which is on the main view.

How can I do this? I included a projet, could someone help me please…

  • 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-05-16T12:42:55+00:00Added an answer on May 16, 2026 at 12:42 pm

    I usually use a delegate protocol:

    in the second view h add :

    @protocol viewControllerDelegate;
    
    @interface viewController : UIView  
    
    id < viewControllerDelegate > delegate;  
    @property (nonatomic, assign) id < QuickViewControllerDelegate > delegate;
    
    @end
    
    @protocol viewControllerDelegate
    
    - (void)viewController:(ViewController *)controller stringForLabel:(NSString*)string; 
    
    @end
    

    in the second view m file call:

    [delegate quickViewController:self
    stringForLabel:@"your string"];
    

    in the main view h file add: , like that:

     @interface MainView:UIViewController<viewControllerDelegate>
    

    in the main view m file:

    first: when you init the second view don’t forget to add:

    secondview.delegate = self;
    

    other wise it wont work.

    second: add the delegate function:

     - (void)viewController:(ViewController*)controller stringForLabel:(NSString*)string{
    
        //set the label from the string passed
    
        lable.text = string;
    
        }
    

    hope it will help
    shani

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

Sidebar

Related Questions

I have small page which has label, DropDownList and a submit button. <div> <asp:label
I have a View which I want to have a label and 2 buttons
I have this label control in my web page <asp:Label ID=Label1 runat=server Text=test></asp:Label> And
I have a main canvas 'blackboard' in a panel, this canvas has itself several
i have a main Activity called Main which has onActivityResult Method. protected void onActivityResult(int
I have two classes which extend Activity and need to call another class method
I have a database with two main tables notes and labels . They have
I have a label function like : private function formatDate (item:Object, column:DataGridColumn):String { var
i have a label in my form, and im trying to get the value
Here's the situation: I have a label's text set, immediately followed by a response.redirect()

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.