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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:05:33+00:00 2026-05-26T22:05:33+00:00

I created a custom tableView cell and I can see my tableView with the

  • 0

I created a custom tableView cell and I can see my tableView with the desired custom cell. Now the problem is I am not able to select my table row. I tried to display console output from within - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
but It never fets called. I am confused. I don’t know what I am doing wrong. Following is my Customized cell class:

- (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier {

    if (self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) {

        // Initialization code

        CGRect contentRect = self.contentView.bounds;
        CGFloat boundsX = contentRect.origin.x;

        _title = [[UILabel alloc]initWithFrame:CGRectMake(boundsX +70, 5, 100, 25)];
        _title.textAlignment = UITextAlignmentLeft;
        _title.font = [UIFont systemFontOfSize:14];

        _details = [[UILabel alloc]initWithFrame:CGRectMake(boundsX + 70, 30, 100, 15)];
        _details.textAlignment = UITextAlignmentLeft;
        _details.font = [UIFont systemFontOfSize:10];

        _duration = [[UILabel alloc] initWithFrame:CGRectMake(boundsX + 200, 10, 65, 15)];
        _duration.textAlignment = UITextAlignmentRight;
        _duration.font = [UIFont systemFontOfSize:10];

        _price = [[UILabel alloc]initWithFrame:CGRectMake(boundsX + 180, 30, 80, 15)];
        _price.textAlignment = UITextAlignmentRight;
        _price.font = [UIFont systemFontOfSize:10];

        _listingImage = [[UIImageView alloc]initWithFrame:CGRectMake(boundsX +10, 0, 50, 50)];

        [self.contentView addSubview:_title];
        [self.contentView addSubview:_details];
        [self.contentView addSubview:_price];
        [self.contentView addSubview:_duration];
        [self.contentView addSubview:_listingImage];

        [_title release];
        [_details release];
        [_duration release];
        [_price release];
        [_listingImage release];

    }

    return self;

}

Below is my tableView: cellForRowAtIndexPath: function:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";


    CustomizedCell *cell = (CustomizedCell *) [self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil)
    {
        cell = [[[CustomizedCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
     //   cell = [[[CustomizedCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:CellIdentifier] autorelease];

    }

    ADJListing *listing = [self.dataSource.listings objectAtIndex:indexPath.row];

    cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;


    cell._title.text = listing.title;
    cell._details.text = listing.details;
    cell._price.text = [listing.price stringValue];
    cell._duration.text = (NSString*) listing.start_datetime;
    cell._listingImage.image = [UIImage imageNamed:@"picture.png"];

    return cell;
}

Again this is my tableView:didSelectRowAtIndexPath: method

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
   // [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
    NSLog(@"data");

    detailedVC = [[DetailedViewController alloc] init];
    detailedVC.dataSource = self.dataSource;
    [self.navigationController pushViewController:detailedVC animated:YES];
    [detailedVC release];
}

Any help would be appreciated.

Thanks
Vik

  • 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-26T22:05:33+00:00Added an answer on May 26, 2026 at 10:05 pm

    I got it. I somehow had self.tableView.allowsSelection = NO and i missed it. Its working fine now. Thanks

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

Sidebar

Related Questions

I have a custom tableview cell created programmatically that consists of: a background view
I've got a problem trying to create a custom tableview cell for my iPhone
I created a custom cell. When I use these custom cells in table view
I'm reading a custom table cell in tableView:cellForRowAtIndexPath: from a nib file. This works
I have created a custom cell for my TableView to show 1 ~ 5
I have 5 cells in a tableview that are all custom. Meaning, I've created
I have created custom cell in which there are n number of image views.
i created a custom menu called top-navigation. Now I'd like to style it with
I created a custom menu called sub-top-nav and now I'd like to override the
I have created a custom UITableViewCell , but when I dequeue the cell, sometimes

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.