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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:15:07+00:00 2026-05-20T14:15:07+00:00

I am trying to modify the tutorial Ray Wenderlich has created at: http://www.raywenderlich.com/1888/how-to-create-a-simple-iphone-app-tutorial-part-33 So

  • 0

I am trying to modify the tutorial Ray Wenderlich has created at:
http://www.raywenderlich.com/1888/how-to-create-a-simple-iphone-app-tutorial-part-33
So that I can reorder the tableview and save the new order of the bugs, but I am having trouble getting it to work.

I know I have to use the:

- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { };

Method, but I am having a hard time figuring out what to do!

I have tried asking the question to Ray directly, but got no answer. If anyone can help me with this, I will be so happy 🙂

UPDATE:

I have solved the part where I edit the _bugs array using:

NSString *stringToMove = [[_bugs objectAtIndex:fromIndexPath.row] retain]; 
[_bugs removeObjectAtIndex:fromIndexPath.row]; 
[_bugs insertObject:stringToMove atIndex:toIndexPath.row]; 
[stringToMove release];

But I am still having trouble renaming the individual files, or what I have to do, to get the _bugs to load in the right order.

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-05-20T14:15:07+00:00Added an answer on May 20, 2026 at 2:15 pm

    in order to reorder a table view you should first reorder the source of data where it gets populated from, and then reload part or the whole table view. Normally this data is stored within an array, and gets retrieved in the method cellForRowAtIndexPath.

    In the case of the tutorial you mentioned, the array containing the data seems to be _bugs. If you look at how he deletes a row, in the tableView:commitEditingStyle:forRowAtIndexPath he first deletes the element in the array, then the row in the table view.

    So, to sum up, what you should do when you want to reorder a table view is:

    1. Reorder the array: Here you can see how to achieve that.
    2. Call the method [tableView reloadData] so the tableView refreshes its data.

    I hope this helped you,

    cheers

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

Sidebar

Related Questions

I'm testing CodeIgniter, and trying to create a simple blog. The video tutorial on
I'm trying to follow the grails tutorial here . When I create a new
I'm trying to modify my GreaseMonkey script from firing on window.onload to window.DOMContentLoaded, but
I'm trying to modify the class of an element if an ajax call based
I am trying to modify the output stream to search/replace some XHTML tags returned
I'm currently trying to modify some HttpWebRequest functions, but I can't do it through
I'm trying to modify the contents of an MSI file using Powershell. To do
I'm trying to modify the UI of a Redmine installation (Redmine 0.7.3.devel.2093 (MySQL)). When
I'm trying to determine how to modify SAP R/3 package code of an installed
Trying to find some simple SQL Server PIVOT examples. Most of the examples that

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.