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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:24:53+00:00 2026-06-06T08:24:53+00:00

I am doing a news reader app and I want to make it so

  • 0

I am doing a news reader app and I want to make it so that the user can choose show/hide news categories (such as top news, business, technology, sports, etc) and reorder them like the BBC news app in Android.

See the picture below:

enter image description here

My question is:

  • How do I make reorder control in left side of cell?
    (Its default position is in the right side of the cell in edit mode)
  • I have a checkbox custom control. How do I put it in right side of the 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-06T08:24:55+00:00Added an answer on June 6, 2026 at 8:24 am

    Answer [If you’re not using any accessories (detail disclosure, &c)]

    (0) I assume you have your tables set up, &c.

    (1) This solution only works if your tables cells are always draggable. Add this in your viewDidLoad to your Table View Controller .m file.

    - (void)viewDidLoad
    {
        [super viewDidLoad];
        [self setEditing:YES];
    }
    

    (2) To make it so you can reorder your cells, add cell.showsReorderControl = YES; to your tableView:cellForRowAtIndexPath:.

    (3) Ensure that you have the tableView:canMoveRowAtIndexPath: and tableView:moveRowAtIndexPath:toIndexPath: methods.

    - (BOOL)tableView:(UITableView *)tableview canMoveRowAtIndexPath:(NSIndexPath *)indexPath
    {
        return YES; 
    }
    
    - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
    {
    }
    

    (4) Because you want the reorder control on the left, we have to take away the Delete circle usually there and the tableView:editingStyleForRowAtIndexPath: method does that.

    - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        return UITableViewCellEditingStyleNone;
    }
    

    (5) Last step, where the magic happens – add the tableView:willDisplayCell:forRowAtIndexPath: method, search for the cell’s subviews, narrow it down to the private UITableViewCellReorderControl, and finally override it.

    - (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
    {
        for(UIView* view in cell.subviews)
        {
            if([[[view class] description] isEqualToString:@"UITableViewCellReorderControl"])
            {
                // Creates a new subview the size of the entire cell
                UIView *movedReorderControl = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetMaxX(view.frame), CGRectGetMaxY(view.frame))];
                // Adds the reorder control view to our new subview
                [movedReorderControl addSubview:view];
                // Adds our new subview to the cell
                [cell addSubview:movedReorderControl];
                // CGStuff to move it to the left
                CGSize moveLeft = CGSizeMake(movedReorderControl.frame.size.width - view.frame.size.width, movedReorderControl.frame.size.height - view.frame.size.height);
                CGAffineTransform transform = CGAffineTransformIdentity;
                transform = CGAffineTransformTranslate(transform, -moveLeft.width, -moveLeft.height);
                // Performs the transform
                [movedReorderControl setTransform:transform];
            }
        }
    }
    

    I spent nearly ten hours trying to figure out a solution for when accessories and I couldn’t do it. I need more experience and knowledge first. Simply doing the same thing to the reorder control on the disclosure button didn’t work. So I hope this would works for now; and if I figure it out in the future I’ll be sure to update this.

    Hi Hoang Van Ha, this is my first answer ever, and I only started learning Objective-C a month ago, so I’m still quite a noob.

    I’ve been trying to do the same thing with my app and have been searching for hours how to do it. Apple’s documentation isn’t very much help when it comes to this. I found it quite frustrating when people would simply link to the documentation. I wanted to yell at them. I hope my answer helped you.

    Lots of kudos to b2Cloud because I used some of their code from this article and adapted it for my answers.

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

Sidebar

Related Questions

In a mini blog app, I want to create a delete function, so that
I'm doing such a small web page that contain 4 main HTML div which
I'm doing a simple news importer for a sharepoint site using timer job that
In my app I need to show a large volume of data(news) to the
I'm doing pretty simple thing here: getting Facebook news feed using their graph API.
Actually im doing a home page that only have an action called Index() that
Is it possible to create a django template that can be used (nested) inside
I have noticed that, from Google Maps page, you can get an embed link
i'm doing a News project.We have news category, news sub category, and news detail
I am doing a NEWS site project in PHP and for this project I

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.