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

  • Home
  • SEARCH
  • 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 6541247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:04:53+00:00 2026-05-25T11:04:53+00:00

like build in apple notes app, after you swipe to delete the selected row,

  • 0

like build in apple notes app, after you swipe to delete the selected row, it will select the nearest available row automatically.

The logic should be:

if row count > 0 then
if deleted_row == last row then
select deleted_row_index-1 row
else
select deleted_row_index+1 row
end
end

i have try to implement the above logic in the commitEditingStyle event, but the selection fail.
the selectRowAtIndexPath logic just don’t work in this event, if i apply it in a button, it works.

any idea?

  • 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-25T11:04:53+00:00Added an answer on May 25, 2026 at 11:04 am

    One way to solve this is to use the method performSelector:withObject:afterDelay:.

    From within the tableView:commitEditingStyle:forRowAtIndexPath: you can:

    NSIndexPath *indexPathToSelect = ...
    [self performSelector:@selector(selectRowAtIndexPath:) 
               withObject:indexPathToSelect
                   afterDelay:0];
    

    Then define the selectRowAtIndexPath: method in your view controller

    - (void)selectRowAtIndexPath:(NSIndexPath *)indexPath {
      [self.tableView selectRowAtIndexPath:indexPath 
                                  animated:YES 
                            scrollPosition:UITableViewScrollPositionTop];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to build an application that will run on a web, this
I would like to build a query that will pull the number of rows
please excuse the stupidity of my question.. Things like Adobe After Effects, Apple final
I have setup in app purchases and I would like to display the apple
I'd like to build a query string based on values taken from 5 groups
I'd like to build a real quick and dirty administrative backend for a Ruby
I'd like to build a pretty simple plug-in for Visual Studio, but I don't
I'd like to build a CMS site based on Asp.Net Mvc and I want
I would like to build a regexp in Java that would be passed in
I'd like to build s on the fly in a box based on an

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.