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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:16:19+00:00 2026-06-17T15:16:19+00:00

hi i am implementing a table in which i am getting request i have

  • 0

hi i am implementing a table in which i am getting request i have list of students to which i want to add as my room mate i have two button accept and reject the problem is here when i click on accept button i want that row will be deleted from the array and also i want to shift the deleted row value into the table of nextview controller in case of accept request . and in case of reject button cliked only want to delete the row not to move the value of cell into next view controller i am implementing this project by using storyboard can anybody have idea about that plase share me this is the code for cellForRowAtIndexPath:

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

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"DefaultCell"];
    if(cell == nil) {
        cell =[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"DefaultCell"];

    }
    acceptreq = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    acceptreq.frame =CGRectMake(170, 10, 60, 30);
    rejectreq = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    rejectreq.frame =CGRectMake(240, 10, 60, 30);
    [acceptreq setTitle:@"Accept" forState:UIControlStateNormal];
    [rejectreq setTitle:@"Reject" forState:UIControlStateNormal];
    [acceptreq addTarget:self action:@selector(Acceptrequest:) forControlEvents:UIControlEventTouchUpInside];
    [rejectreq addTarget:self action:@selector(Rejectrequest:) forControlEvents:UIControlEventTouchUpInside];
    [cell addSubview:acceptreq];
    [cell addSubview:rejectreq];
    [acceptreq setTag:indexPath.row];
    cell.textLabel.text = [myarray objectAtIndex:indexPath.row];
    return cell;

}
  • 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-17T15:16:20+00:00Added an answer on June 17, 2026 at 3:16 pm

    In short you can delete selected Row with clicking UIbutton like bellow:-

    -(IBAction)Acceptrequest:(id)sender
    {
    UIButton *btn =(UIButton*)sender;
    
    [myarray removeObjectsAtIndexes:btn.tag];
    [tableView deleteRowsAtIndexPaths:myarray withRowAnimation:UITableViewRowAnimationAutomatic];
    
    [tableVIew reloadData];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm implementing a system login which in database I have this table: cat_clients Id
I have a working table view on my iphone app, and am implementing a
I have a django application which has one main table/model which references various 'lookup'
I have a table generated by php and implementing a modal to allow user
I was implementing a chat system to my app, in which only the list
I have a database for a forum-like website. It has a 'users' table, which
I have a jsp page in which there is a html table. The contents
I have a column in table which contains XML text, but it is not
I'm implementing a hash table and linked list in C++ (no STL - don't
I am trying to create a table view which uses two types of cells

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.