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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:01:06+00:00 2026-06-01T11:01:06+00:00

I have a working table view on my iphone app, and am implementing a

  • 0

I have a working table view on my iphone app, and am implementing a second view using navigationController.

But when I try to select a cell on the initial view, it does not respond i.e. no highlighting in blue, no selection.

Can anyone suggest what I might have missed, or what is responsible for actually selecting the cell when the user taps it?

OK thanks for your suggestions – still no luck. here is my code:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]autorelease];

        [cell setSelectionStyle: UITableViewCellSelectionStyleBlue]; 

        UIView *selectionView = [[[UIView alloc] init] autorelease];
        selectionView.backgroundColor =[UIColor redColor];
        cell.selectedBackgroundView = selectionView;
    }

    // format text

    cell.textLabel.font = [UIFont fontWithName:@"Arial" size:12];
    cell.textLabel.text = [tableArray objectAtIndex:indexPath.row];

        return cell;
}


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

    //NSUInteger row = indexPath.row;
    //[DetailView selectRowAtIndexPath:indexPath animated:YES];

    //UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath.row];
    //[cell setSelectionStyle: UITableViewCellSelectionStyleBlue]; 


    DetailView *detailView = [[DetailView alloc] initWithNibName:@"DetailView" bundle:nil];
    [self.navigationController pushViewController:detailView animated:YES];
    [DetailView release];

}
  • 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-01T11:01:07+00:00Added an answer on June 1, 2026 at 11:01 am

    Without looking at your code I would say you have to add this line in your cellForRowAtIndexPath delegate method.

     [cell setSelectionStyle:UITableViewCellSelectionStyleBlue];
    

    And also you have to implement this delegate method which gets called when you tap on cell of UITableView..

    -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    {
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an iphone app. I have eight tables in a view
I have an iphone app that uses table view as the interface. Each time
I am working on a app and i have a main table view. By
I have a database table using an enum. This is already working with hibernate
I'm working on an table drill-down style iPhone app that has prepopulated data. I
I have a iPhone app that I'm working on and it works alot like
I'm working on a view-based iPhone app that has the following flow: search ->
I am working on an iphone app in IOS5 that user storyboards. I have
At the moment, I have a settings view in my iPhone app built with
I am working on an iPhone app for an event and I have to

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.