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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:17:09+00:00 2026-05-26T14:17:09+00:00

This is probably a dumb question but I’m just learning. If I have a

  • 0

This is probably a dumb question but I’m just learning. If I have a method that creates a UITableView in code when a button is pressed like this

UITableViewcontroller *contentView = [[UITableViewController alloc] initWithSytyle:UITableViewStylePlain];
contentView.tableView.delegate = self;
contentView.tableView.datasource = self;
[contentView release];

In the UITableView delegate and datasource methods, how do I check if it is this tableView or another TableView? Do I have to have to have an instance variable for this tableView that always points to it for those delegate and datasource methods? 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-26T14:17:10+00:00Added an answer on May 26, 2026 at 2:17 pm

    You can use tag property. In your code

    UITableViewcontroller *contentView = [[UITableViewController alloc] initWithSytyle:UITableViewStylePlain];
    contentView.tag == 10;//add this line in your code
    contentView.tableView.delegate = self;
    contentView.tableView.datasource = self;
    [contentView release];
    

    then in your delegate method or datasource methods check

    if(view.tag == 10)
    {
    //do stuff
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is probably a really dumb question, but I'm finding conflicting information. I have
I have that this is a dumb question feeling, but here goes ... Can
This is probably a really dumb/noob like question but what is the best method
I feel like this is probably a pretty dumb question, but I am just
This is probably a really dumb question with a simple answer but... I am
I'm very new to Java programming language so this is probably dumb question but
This is probably a dumb question but I can't find it anywhere... Which icon
this is probably a dumb question, but wasnt too sure what else to do.
sorry this is probably a dumb question, but I want to make the background
This is going to be a really dumb question, I just know it, but

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.