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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:46:34+00:00 2026-06-02T08:46:34+00:00

I have a list of trucks in a mock database with various attributes as

  • 0

I have a list of trucks in a mock database with various attributes as well as a list of block parties also in a mock database with various attributes (they are different from the truck attributes). Each of the lists populate two different UITableViews in two different xibs in a tab bar application. I have a third tab bar xib for favorites. I want the ability of users to tap an “Add this to Favorites” button so that either a truck or a block party can be placed into the list of favorites. Does anyone have an idea of how this might be possible? If not, both then at least how would I be able to add the Trucks to the favorites?

   // Initialize the mock database of trucks.
listContent = [[NSArray alloc] initWithObjects:
               [Truck truckWithCuisine:@"American Cuisine" name:@"Buttermilk Truck" menu:[NSData dataWithContentsOfFile:@"/Users/Steve/Desktop/Truck Tracker App/Truck Tracker App/Buttermilk Truck Menu.tiff"] latitude: [NSNumber numberWithDouble: 0.1] longitude: [NSNumber numberWithDouble: 0.1]schedule:@"7/15/12"],
               [Truck truckWithCuisine:@"American Cuisine" name:@"In N Out Burgers" menu:[NSData dataWithContentsOfFile:@"/Users/Steve/Desktop/Truck Tracker App/Truck Tracker App/Lobsta Truck Menu.tiff"]
                              latitude: [NSNumber numberWithDouble: 23.2] longitude: [NSNumber numberWithDouble: 80.2] schedule: nil],
               [Truck truckWithCuisine:@"Mexican Cuisine" name:@"Hacienda Mexican" menu: nil
                              latitude: [NSNumber numberWithDouble: 42.3] longitude: [NSNumber numberWithDouble: 64.3] schedule: nil],
               [Truck truckWithCuisine:@"Indian Cuisine" name:@"Naboo Indian"  menu: nil
                              latitude: [NSNumber numberWithDouble: 0.4] longitude: [NSNumber numberWithDouble: 0.4] schedule: nil],
               [Truck truckWithCuisine:@"Italian Cuisine" name:@"Vito's Italian" menu: nil
                              latitude: [NSNumber numberWithDouble: 33.9698156] longitude: [NSNumber numberWithDouble: -118.4185009] schedule: nil],
               nil];
selectedTruck = nil;
NSLog(@"delegate: %d", [listContent count]);    

//Initialize the mock database of users.
listPeople = [[NSMutableArray alloc] initWithObjects:
              [Person personWithEmail:@"stephen@techgroupintl.com" password:@"test" type:@"User"],
              [Person personWithEmail:@"dondi@lmu.edu" password:@"test" type:@"Truck Owner"],
              nil];
selectedPerson = nil;

//Initialize the mock database of block parties.
listParty = [[NSArray alloc] initWithObjects:
             [BlockParty blockpartyWithName:@"Westside Food Truck Central" listOfTrucks: nil latitude: [NSNumber numberWithDouble:200.1] longitude: [NSNumber numberWithDouble: 146.5] schedule:@"7/15/12" ],
             [BlockParty blockpartyWithName:@"Venice Food Truck Paradise" listOfTrucks:nil latitude:nil longitude:nil schedule:nil], 
            nil];
selectedBlockParty = nil;
  • 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-02T08:46:35+00:00Added an answer on June 2, 2026 at 8:46 am

    One way that I can think of is by posting a notification along with the object from trucks tableview (class) and from the parties tableview (class) when a row is selected. Then in your Favorites class, implement an observer of that notification message and add the object to your tableview when a message is received.

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

Sidebar

Related Questions

I have a list of objects (trucks) with various attributes that populate a tableview.
I have a list of trucks listed below. I also have a list of
I have list of structure. I want to modify a particular data from the
In my app I have a list of Trucks that are displayed in a
Hi say I have a list of strings: var listOfStrings = new List<string>{Cars, Trucks,
I have a list of artists, albums and tracks that I want to sort
I have list of input area in the form with id like contact1_title, contact2_title,
I have list of articles on the page in table and i want to
I have list of textareas. For textareas I use tinyMCE Editor. When I start
I have List I want to sort Desc by Priority, which is int and

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.