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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:16:39+00:00 2026-05-23T08:16:39+00:00

http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/TableView_iPhone/ManageInsertDeleteRow/ManageInsertDeleteRow.html I need both insertion and deletion options so… self.navigationItem.rightBarButtonItem = self.editButtonItem; UIBarButtonItem *addButton

  • 0

http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/TableView_iPhone/ManageInsertDeleteRow/ManageInsertDeleteRow.html

I need both insertion and deletion options so…

self.navigationItem.rightBarButtonItem = self.editButtonItem;
UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addItem:)];
self.navigationItem.leftBarButtonItem = addButton;

Thats all good so far. I am done programming with “deletion” but having trouble with “insertion”

   - (void)addItem:sender {
}

What do I add inside this addItem to start “Editing mode” and change my EditingStyle to UITableViewCellEditingStyleInsert? What the hell is that iteminputcontroller as seen in the apple library? There’s no explanation on that and help is vague online 🙁

  • 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-23T08:16:40+00:00Added an answer on May 23, 2026 at 8:16 am

    Invoke setEditing function of your tableView inside your addItem method.

    - (void)setEditing:(BOOL)editing animated:(BOOL)animate
    

    Should be like below.

    - (void)addItem:sender {
       [myTableview setEditing:YES animated:YES];
    }
    

    Return UITableViewCellEditingStyleInsert from your editingStyleForRowAtIndexPath method.

         - (UITableViewCellEditingStyle)tableView:(UITableView *)aTableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
    
            if(someCondtion){
            return UITableViewCellEditingStyleInsert;
            } else {
            return UITableViewCellEditingStyleDelete;
            }
    }
    

    Update the data model according to edit actions delete or insert.

    - (void)tableView:(UITableView *)aTableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
        forRowAtIndexPath:(NSIndexPath *)indexPath {
    
        if (editingStyle == UITableViewCellEditingStyleDelete) {
           //put code to handle deletion
           [myTableView reloadData];
        } else if (editingStyle == UITableViewCellEditingStyleInsert) {
           //put code to handle insertion
           [myTableView reloadData];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(Using iOS 5 and Xcode 4.2.) I've followed the instructions here: http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/LocationAwarenessPG/AnnotatingMaps/AnnotatingMaps.html#//apple_ref/doc/uid/TP40009497-CH6-SW15 and used
https://web.archive.org/web/20110604185120/http://developer.apple.com/library/ios/documentation/iphone/conceptual/iPhone101/Articles/05_ConfiguringView.html To add an action for the button . . . In Xcode, select
i am new to openGL. Iam using apple documentation as my major referens http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html#//apple_ref/doc/uid/TP40008793-CH107-SW6
In this link it says it does: http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html However I have searched for an
http://developer.apple.com/mac/library/documentation/DeveloperTools/gcc-4.0.1/gcc/Thread_002dLocal.html Documents __thread yet my g++ complains that __thread is not supported on my
In the section titled 'Memory Warnings' here http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmNibObjects.html , I don't follow why the
In this Apple code: http://developer.apple.com/library/ios/#qa/qa1702/_index.html I can see that the session allocated at the
The DocInteraction sample code made available by Apple at http://developer.apple.com/library/ios/#samplecode/DocInteraction/Introduction/Intro.html (download: http://developer.apple.com/library/ios/samplecode/DocInteraction/DocInteraction.zip ) does
These are standart actions for UIMenuController declared http://developer.apple.com/library/ios/#documentation/uikit/reference/UIResponderStandardEditActions_Protocol/UIResponderStandardEditActions.html How can I perform these methods
Over here http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/TabBarControllers/TabBarControllers.html at listing 4.1 - (void)applicationDidFinishLaunching:(UIApplication *)application { tabBarController = [[UITabBarController alloc]

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.