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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:06:19+00:00 2026-06-01T03:06:19+00:00

I have an array of users in my app delegate, and in one of

  • 0

I have an array of users in my app delegate, and in one of the screens I am trying to create an object to add to that array. The user attributes are only an email and a password. On the screen I have two text fields and a button. I want it so that when the button is pressed it generates a new user from what was entered into the fields and places that into the array of users in the app delegate.

Sorry learning the stack overflow interface atm. I’m working with the following code:

-(IBAction)addPerson:(id)sender:(ContactViewController *)controller 
{
    Person *newPerson = [Person personWithEmail:controller.usernameTextField.text password:controller.passwordTextField.text]; 
    [self.(Truck_Tracker_AppAppDelegate *)UIApplication.sharedApplication.delegate).listPeople addObject:newPerson];
}

I think I’ve created the Person object newPerson successfully, I’m just having trouble getting it to the app delegate.

  • 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-01T03:06:21+00:00Added an answer on June 1, 2026 at 3:06 am

    If it’s an array then it can be either a NSArray or a NSMutableArray.

    The first one is immutable, you cannot add elements to an existing NSArray, you can just create a new one with an added element.

    In this first case you should do something similar to

    self.array = [array arrayByAddingObject:newUser];
    

    If it’s a NSMutableArray then you can easily add the item by doing

    [self.array addObject:newUser];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app that displays 9 UIImageViews, and I'm trying to add in
I have this block of code: users = Array.new users << User.find(:all, :conditions =>
I am using PHP and I have an array of user images that I
I only have one managed object context. I have modified the managed object store
If I have an array of say, some ID's of users. How could i
i have created Array of Linkbutton and when user click on link button it
Suppose I have an array of a objects of user defined class. Wanted to
I have an array of objects which populate a UITableView . When a user
I have an int array as a property of a Web User Control. I'd
Does python have a function like call_user_func() in PHP? PHP Version: call_user_func(array($object,$methodName),$parameters) How do

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.