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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:22:14+00:00 2026-06-17T10:22:14+00:00

I have 2 places where I require a UIPickerView in my app and the

  • 0

I have 2 places where I require a UIPickerView in my app and the values that the second represents is dependent on the result of the first one.

However the values of the first one can be changed at run time and so I do not know what they are going to be. This leaves me out the hardcoding option of doing it this way:

        if([_menuCategoryPickerFld.text isEqualToString:@"food_breakfast"])
    {

    }

This would require hardcoding values into my app.

Now the source of my data is MySQL imported via JSON, so when I select an option in the first UIPickerView, it will query and return the correct JSON file.

I need to know if I can compare a value of an array that I will only receive once the app is running??

Thanks in advance.

  • 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-17T10:22:15+00:00Added an answer on June 17, 2026 at 10:22 am

    Not sure I understand, but why not just:

    NSString* mystery = @"blah";
    if([_menuCategoryPickerFld.text isEqualToString:mystery]){ ... }
    

    You don’t need to the the contents of a string to use it in a compare this way.

    • 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 will never require more than one instance of an
I have an application that uses AJAX liberally. I have several places where a
I'm working on a class-based php web app. I have some places where objects
I have read in various places that having variables with global scope, i.e. a
I have read in several places that it's possible to share the objects directory
I have read in several places that single segment namespaces are discouraged in clojure.
We have an enterprise distribution of an app that we would like to distribute
In Ruby, I have been told that when doing require some_file Ruby will look
I have these tables places(place_id, place_name) places_criteria(place_id, criterion_id) criteria(criterion_id, criterion_name) places_criteria have foreign keys
I have seen several places in stackoverflow where folks have elegantly and easily turned

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.