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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:34:52+00:00 2026-06-13T22:34:52+00:00

Using the provided reorderControls, the user can tap and hold to drag a cell

  • 0

Using the provided reorderControls, the user can tap and hold to drag a cell around to reorder it. How can I know which cell they’ve selected to drag and the position of that current cell (ie when other cells animate to make room for the floating cell, I want the indices of the cells that moved)?

What I am trying to do is to scroll the view so that cells that are offscreen will be scrolled onscreen if the user wishes to reorder the current cell with an offscreen cell. I cannot use built in behaviour because my setup is:

UIScrollView (parent)

  • UITableView (child)

And the UITableView frame is the full size of its contentSize (It does not scroll). I need to scroll the outside UIScrollView relative to where the user is dragging a cell to reorder in the UITableView.

I tried looking through the delegate and datasource functions but no luck so far. Also tried googling and Apple documentation…

Edit: SEEMS LIKE I CAN’T READ DOCUMENTATION. tableView:targetIndexPathForMoveFromRowAtIndexPath:toProposedIndexPath: in the delegate protocol gives me what I need.

Solution: create a delegate fro tableview to the scrollview’s controller (my tableview is its own delegate). In the proposed index path function, I sent the delegate the cell near the proposedDestinationIndexPath that needs to become visible. This could be that cell itself if the indexpath is 0 or the max. Then in the delegate I calculate the position of that cell using the [view convertPoint:FromView:] function and set the scrollview’s content offset to make that cell visible!
Thanks

  • 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-13T22:34:53+00:00Added an answer on June 13, 2026 at 10:34 pm

    Normally, as you drag a cell, the table view automatically scrolls when you get to the top or bottom. It sounds like the use of the scrollview is preventing that from working properly since the table view thinks it is big enough not to scroll. There is no normal API call that will give you the answer you want.

    The only thing I can think of that may get you close is the implementation of the tableView:targetIndexPathForMoveFromRowAtIndexPath:toProposedIndexPath: table view delegate method.

    The proposedIndexPath may give you a rough idea where the user has currently dragged the row. You can use that indexPath to ask the table for the CGRect of the path. Then translate that to a position within the content view of the scroll view.

    This is far from perfect though.

    Another possibility might be to add an observer to the frame or center property of the cell being moved.

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

Sidebar

Related Questions

I'm using the code provided below to display time and date. can anyone help
Can anyone assist me in connecting via Management Studio using the hostname provided by
With which methods do I create wiki content on SharePoint, using the provided web
I am using the provided CMakeLists.txt file which contains the code above. What I
I'm using html provided by a designer to create a master page. The html
I have implemented a BackupAgentHelper using the provided FileBackupHelper to backup and restore the
I've been trying to retrieve Google analytics reports using their provided .NET api and
I'm using struts1.3.8. I'm using struts provided elements like ,. Reset is working until
I am using Bouncy Castle provided library to encrypt,decrypt,sign and verify sign. I am
I am using the sample provided here and have used the code inside a

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.