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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:59:06+00:00 2026-05-22T00:59:06+00:00

I have one doubt that how to get other control’s value when we select

  • 0

I have one doubt that how to get other control’s value when we select a row or tap on button while having custom tableViewCell.
Suppose I have a TableView Cell with a TextField, a Slider and button. Button has action using:

btn.tag = indexPath.row;
[btn addTarget:self action:@selector(buttonTapped:) forControlEvents:UIControlEventTouchUpInside];

Now I can get button on its action method. I need to get textField’s value and slider’s value on button tap.

The one option is I create a array and store values for these two control in that array and manage this. But I don’t think this is correct way to manage it.

Please navigate me to the currect way to get value of UITableViewCell’s subview’s value.

Thanks

  • 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-22T00:59:06+00:00Added an answer on May 22, 2026 at 12:59 am

    While creating your textfield and slider, give them a constant tag and then add to cell’s contentView

    textfield.tag= TEXTFIELDTAG; //TEXTFIELDTAG = 100 or any other constant
    [cell.contentView addSubview:textfield];
    

    and then in your buttonTapped: method

    -(void)buttonTapped:(id)sender
    {
    
        int row = ((UIButton*)sender).tag;
        NSIndexPath* indexpath = [NSIndexPath indexPathForRow:row inSection:0]; // in case this row in in your first section
        UITableViewCell* cell = [table cellForRowAtIndexPath:indexPath];
        UITextField* textfield = [cell.contentView viewWithTag:TEXTFIELDTAG];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one doubt. I need to write site on embedded system ( memory
I've been using git for a while for my one-man developments, but I haven't
I have a stored proc on SQL Server 2000 that takes 3 parameters. When
i have doubt about how can i iterate into a group of div, my
I have a very silly doubt in NHibernate. There are two or three entities
I have one spinner in which few values are there from strings.xml and I
I have one object being the result of a database query, looking something like
I've been through the mill with version control. I started with sccs, believe it
I've been working on a site that has a lot of PHP/Smarty involved, I've
I am trying a lot and i am not bale to get how this

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.