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 7526903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:57:52+00:00 2026-05-30T03:57:52+00:00

i have a text held in my main view and a button next to

  • 0

i have a text held in my main view and a button next to textiew ,when i click the button it popup a popoverviewcontroler,in my popover controller view there is some text,in a tableview(high,low,medium,flair)i want when the user tap the high it needs to lot in the main textfield,but i tried nsuserdefault in the DiSelect row at index path.but nothing happen when i click the tableiew.how can i do this.
my code

NSString *strr = @"High";//i put the static value 


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

    [[NSUserDefaults standardUserDefaults] setObject:strr forKey:@"flair"];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

this code is in popoveriewconteroler
and in my main view

- (void)viewDidLoad
{
    [super viewDidLoad];
NSString *strr = [[NSUserDefaults standardUserDefaults] objectForKey:@"flair"];
    textfiled.text = strr;
}

when i go back to another page and comes back it lodes the high in the text filed.but i my red is when the user tap the popoveriewcontroller tableviewcell,it changes the text filed value at the same time.is this possible.
thanks in advance.

  • 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-30T03:57:53+00:00Added an answer on May 30, 2026 at 3:57 am

    so you want to update the text label when user tap on a table cell?

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    {
    
        [[NSUserDefaults standardUserDefaults] setObject:strr forKey:@"flair"];
        [[NSUserDefaults standardUserDefaults] synchronize];
        textfiled.text = strr;
    }
    

    not sure what your asking

    but you can have a property for your popover controller

    @property (nonatomic, retain) MyMainViewController *mainViewController;
    

    and a property for your main view controller

    @property (nonoatomic, retain) UITextField *textField;
    

    than in the place you create the popover controller

    MyPopoverController *popoverController = // create popover controller
    popoverController.mainViewController = // mainViewController
    

    than you can replace

     textfiled.text = strr;
    

    to

    self.mainViewController.textField.text = strr;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to wrap some text onto the next line that I have held
I have text input boxes. There is validation for each of the boxes using
I have text file with some stuff that i would like to put into
I have a number of text files held in directory /results/... All the text
I have the following code which outputs the contents of text files held in
I have some unicode text that I want to clean up using regular expressions.
I have text fields inside a custom view inside an NSOutlineView . Editing one
I have some html that creates a dropdown list. The list has text values
I have text file with a row like this: SendersTimeSeriesIdentification: COMPANY_A/COMPANY_B/REF_7/20090505 I'd like to
I have text like this format term: 156^^^:^^59 datainput Or term: 156^^^:59 datainput or

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.