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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:58:43+00:00 2026-06-15T07:58:43+00:00

This is how the structure looks like. — UIView —- ScrollView — TableView .

  • 0

This is how the structure looks like.

--- UIView
   ---- ScrollView
       --- TableView

.

UIView *topView = [[UIView alloc]initWithFrame:CGRectMake(0, -250, 320, 250)];

UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 70, 320, 150) style:UITableViewStylePlain];
    tableView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
    tableView.delegate = self;
    tableView.dataSource = self;
    tableView.backgroundColor = [UIColor blackColor];
    tableView.separatorStyle = normal;
    [tableView reloadData];

    [topView addSubview:tableView];

    [self.scrollView addSubview:topView];

In the tableview I am working with a custom tableview cell with a button in it. Here is the code for the button in my CellForRowAtIndex

[cell.btnDelete addTarget:self action:@selector(deleteAppointment:) forControlEvents:UIControlEventTouchUpInside];

Now to get the specific row I do this in my deleteAppointment

 UIButton *button = (UIButton *)sender;
    UITableViewCell *cell = (UITableViewCell *)button.superview;
    UITableView *tableView = (UITableView *)cell.superview;
    NSIndexPath *indexPath = [tableView indexPathForCell:cell];
    NSLog(@"row: %d",indexPath.row);

But it is still giving the following error.

-[ExceptionCell indexPathForCell:]: unrecognized selector sent to instance 0x210a2fa0

Can anyone help me?

  • 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-15T07:58:43+00:00Added an answer on June 15, 2026 at 7:58 am

    its really Simple, in cellForRowAtIndexPath. just tag your button like

    cell.button.tag = indexPath.row;
    

    remove the value from array or dictionary (thats your dataSource) in button @selector method

    [array removeObjectAtIndex:button.tag];
    

    Now reload the tableView.

    [tableView reloadData];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The html structure looks like this <div id=parent> parent may contain text <div id=child1>
My HTML structure looks like this <div class=container> <div class=image><img /></div> <div class=title_body> <div
my xml structure looks like this: <entity id=1000070> <name>apple</name> <type>category</type> <entities> <entity id=7002870> <name>mac</name>
Is this possible in any way? My project folder structure looks like this: my_project:
My database structure looks something like this: Person Id Name FieldA FieldB Phone Id
I have a file structure that looks like this ./501.res/1.bin ./503.res/1.bin ./503.res/2.bin ./504.res/1.bin and
I have a directory structure that looks like this: /a/f.xml /b/f.xml /c/f.xml /d/f.xml What
I have an array structure that looks like this: Array ( [0] => Array
If I have a folder structure that looks like this: / /bin/myComponent.cfc /reports/index.cfm How
Using EF4 and Linq I have a data structure which looks like this: parentid

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.