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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:39:34+00:00 2026-06-01T12:39:34+00:00

I was reading the docs to learn how to add a row in a

  • 0

I was reading the docs to learn how to add a row in a table view, and I found this example :

- (void)save:sender {

    UITextField *textField = [(EditableTableViewTextField *)[tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]] textField];

    SimpleEditableListAppDelegate *controller = (SimpleEditableListAppDelegate *)[[UIApplication sharedApplication] delegate];
    NSString *newItem = textField.text;

    if (newItem != nil) {
        [controller insertObject:newItem inListAtIndex:[controller countOfList]];
    }

    [self dismissModalViewControllerAnimated:YES];

}

I don’t understand the method : insertObject:inListAtIndex: or what [[UIApplication sharedApplication] delegate]; stands for; are we putting the data in a plist file? Could someone explain this to me? The UIApplication docs do not really help.

  • 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-01T12:39:35+00:00Added an answer on June 1, 2026 at 12:39 pm

    [[UIApplication sharedApplication] delegate] is the main application delegate, typically this is a class named AppDelegate. The main application delegate is the one that is created on application start-up and which is the main controller for your application.

    I’m going to assume that you’re using something similar to this class as your AppDelegate class.

    [controller insertObject:newItem inListAtIndex:[controller countOfList]];

    This assumes that your AppDelegate class has a method named insertObject:inListAtIndex: on it. For the class I linked the method looks like this:

    - (void)insertObject:(id)obj inListAtIndex:(NSUInteger)theIndex {
        [list insertObject:obj atIndex:theIndex];
    }
    

    So in this case, that method is adding the object to a member variable of your AppDelegate class called List.

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

Sidebar

Related Questions

while reading docs of backbone i can't understand how to add model to collection
After reading this: http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#how-to-use-it I came to the conclusion that it is not valid
Reading about Django, I saw this: http://docs.djangoproject.com/en/1.1/ref/contrib/admin/#ref-contrib-admin - the fancy simple to use admin
Reading this question I found this as (note the quotation marks) code to solve
Reading the online MSDN docs is a great way to learn more about .NET
a noob question here. After reading the docs, I found that saving a model
After reading the docs,I'm doing it this way: ds /c 21 1de2458 But only
I'm having problems with a NonUniqueObjectException thrown by Hibernate. Reading the docs, and this
I previously posted this question ( Reading Google docs spreadsheet ) and got a
I have been reading the docs and playing with different EventQuery parameters for days

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.