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 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

My App, distributed as Ad-Hoc Build, crashes on some devices with crash log like
I have setup in app purchases and I would like to display the apple
I would like to locate the iPhone in a building to build an application
I am getting an error like this: [WARN]Warning: Multiple build commands for output file
I am using AQGridView to build an iPad app that incorporates a flexible grid
I would like to build an iOS whitelabel application which should be customizable to
I'm trying to build a GCC cross-compiler with --host=x86_64-apple-darwin10 and --target=ppc64-linux . I need
I'm learning how to build programs with Cocoa. I'm using a sample Apple application
I have created a cocoa touch static that uses standard apple frameworks like MediaPlayer.framework
I'd like to build a C pre-processor / compiler that allows functions to be

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.