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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:11:55+00:00 2026-05-18T02:11:55+00:00

I communicate with a json api in my cocoa (touch) app. As a response

  • 0

I communicate with a json api in my cocoa (touch) app.

As a response I get something like this:

"wh": {
 "1": ["11.30 - 15.00"], 
 "3": ["11.30 - 15.00"], 
 "2": ["12.00 - 14.00", "17.30 - 23.00"], 
 "5": ["11.30 - 15.00"], 
 "4": ["11.30 - 15.00"]
}, 

Keys 0 to 6 reflect the weekdays (Monday == 0, Tuesday = 1, ….)

To map this I have a NSArray:

weekdays = [[NSArray alloc] initWithObjects:@"Montag",
       @"Dienstag",
       @"Mittwoch",
       @"Donnerstag",
       @"Freitag",
       @"Samstag",
       @"Sonntag", nil];

I need this in two viewcontrollers – currently set in the viewWillAppear. 🙁

So my question(s):

  1. Where/When should I set this weekdays array?
  2. How to access it in the viewcontrollers?
  3. Any suggestions?
  • 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-18T02:11:55+00:00Added an answer on May 18, 2026 at 2:11 am

    Use a singleton to store that kind of information, here is an example:

    http://getsetgames.com/2009/08/30/the-objective-c-singleton/

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

Sidebar

Related Questions

We are trying to communicate with a remote API which requires JSON formatted data.
I'm using JSON to communicate between my rails app and iOS via RestKit (Thanks
On the server side, I have code like this to provide JSON to my
I am trying to get jquery to communicate with a web service!! function Test(item)
I'm putting together a JSON API which may or may not be built with
I wrote a server-client app in javascript/HTML5 its supposed to allow clients to communicate/play
I am iPhone developer. I have used JSON framework to communicate between iphone and
I'm trying to communicate with u rban airship API using a ROR web application.
I'm building a RESTful web api with asp.net mvc, which returns pure json data.
So I'm stuck at this point. I am trying to communicate with JanRain's auth_info

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.