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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:26:42+00:00 2026-06-01T10:26:42+00:00

Perhaps I’m misunderstanding how this should work, but I’ve created an object in the

  • 0

Perhaps I’m misunderstanding how this should work, but I’ve created an object in the app delegate, and on a tab bar controller I set the object, but when I go to the other tabs it doesn’t seem to exist anymore.

This is the only place I reference it in the app delegate.

AppDelegate.h

@property (strong, nonatomic) Encounter *encounter;

AppDelegate.m

@synthesize encounter;

Here is where I set it on the first page of the tab controller. This is the only time it’s referenced on the intial tab controller view. The loadEncounter method is simply passing it the json results from the web api. Then I load set the values of the views labels.

ehrxAppDelegate *app = [[UIApplication sharedApplication]delegate];
app.encounter = [[Encounter alloc] init];
[app.encounter loadEncounter:result];

nameLabel.text = app.encounter.subscriber_name;
locationlabel.text = app.encounter.location_name;
dateLabel.text = app.encounter.encounter_time;
genderLabel.text = app.encounter.subscriber_gender;
dobLabel.text = app.encounter.subscriber_dob;
statusLabel.text = app.encounter.admission_status;
detailsLabel.text = app.encounter.details;

This is how I access it on the second view in the tab controller. I was under the impression that since I set it’s value on the first view I could just grab it on the second view and use it again.

ehrxAppDelegate *app = [[UIApplication sharedApplication]delegate];
self.encounters = app.encounter.encounters;

[self.tableView reloadData];
  • 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-01T10:26:43+00:00Added an answer on June 1, 2026 at 10:26 am

    Does app.encounter.encounters work in the first view. Since you can still access app.encounter it seems that the object persists ok across your vire controllers. So maybe there is an issue with encounter.encounters variable.

    How did you set encounters ?

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

Sidebar

Related Questions

Perhaps I am not getting SQL Parameters correctly, but this doesn't work for me.
Perhaps a noob question, but take this T-SQL query in mind: UPDATE Table SET
Perhaps this question has been asked elsewhere, but I'm unable to find it. With
Perhaps this has something to do with it being the mainForm, but I'll ask
Perhaps there is a better way to do this, but here's where I'm at
Perhaps a stupid question, but what exactly is the purpose of this Delphi folder?:
Perhaps my brain is fried, but I'm writing a plugin that created an tweaks
Perhaps there's a better way to set this up so I'm open to suggestions.
Perhaps I haven't found the right post but I have been unable to set
Perhaps i am being stupid by asking this just now, but... I notice that

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.