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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:54:17+00:00 2026-06-10T10:54:17+00:00

I have added a segment control to my table view and what my problem/question

  • 0

enter image description hereI have added a segment control to my table view and what my problem/question is I need to display text in tableview cells based on segment selected.

I have followed some tutorials, in that they gave me text in labels based on segment selected. I used segmentControl.selectedIndexPath also. So can anyone tell me how can we set that array of objects to my tableview cells based on segment selected?

Correct me if any mistakes in my english.

Please help me.
Thanks a lot for help.

  • 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-10T10:54:19+00:00Added an answer on June 10, 2026 at 10:54 am

    First of all you have to divide your data in different arrays depends on your requirement ie Number of segmentControl.

    Here if there are three segment controls then create three array an in the table view’s delegate methods depending on segment control’s selected index change the array to display in table view.

    Like if segmentControl.selectedIndex == 0 then array1 if == 1 then array2 and if == 2 then array3.

    In all delegate and datasource methods of table view. And on segment control’s selecedIndexChange: method call reload table.

    Happy Coding 🙂

    EDIT 1

    For change data in table view on segmented control’s index change you must have one IBOutlet for tableView and use that IBOutlet to change the data using [tableView reloadData]; here tableView is IBOutlet for table view.

    Happy Coding 🙂

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

Sidebar

Related Questions

I have a segment control added to the navigation bar. It works fine. When
I have added an extra field Specification in Catalog->Product->Data tab. This text is stored
I have a view controller (derived from UIViewController not UITableViewController) containing a table view.
I have added a UISegmentedControl in my application. None of the buttons are selected
Below I have a segment of my code that I recently added to my
I'd like to have my NSSegmentedControl with a segment selected when enabled and with
I have added a rad combobox to a page and need to be able
I have added selectionDidChange event for my Ember.Select, but when my view loads it
I have an Access table that I recently added an attachment field to. The
I have this problem with the code below which converts number to ASCII 'number-text'.

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.