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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:16:15+00:00 2026-05-24T22:16:15+00:00

i need some help with nsarrays and uipicker i have a table of data

  • 0

i need some help with nsarrays and uipicker

i have a table of data consisting of columns a,b,c,d
and rows m1,m2,m3,m4
each cell in the table has 2 values an upper and lower limit

so cell m3,b has the values 20 and 25 for example

sorry if this is not very clear, i wanted to insert a picture of the table but i don’t have enough reputation points to do so

anyway i simply want to represent this data table in a uipickerview, so that component 0 has the rows m1,m2,m3 etc component 1 has the columns a,b,c,d etc and column 2 and 3 show the upper and lower limits

i think to do this needs a 2d array, but i don’t know how to create the datasource properly

can anyone please advise

many thanks

  • 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-24T22:16:15+00:00Added an answer on May 24, 2026 at 10:16 pm

    herewith my solution to the question i asked several weeks ago
    it might be of use to someone else
    who knows?

    this went in my view did load

        //integer to hold the current row of component 0, this is set to "0" when the view loads.
    component0 = 0;
    component1 = 0;
    
        // get the plist
    
    NSString *path = [[NSBundle mainBundle ] pathForResource:@"mywheelsdata" ofType:@"plist"];
    
        // Assign the contents of the plist to a NSDictionary for processing
    mypickervalues = [[NSDictionary alloc] initWithContentsOfFile:path];
    
        // Creats an array from the keys which we will then use as labels in the picker.
    
    NSArray *sortArray = [[NSArray alloc] initWithArray:[mypickervalues allKeys]];
    
    wheelone = [[NSArray alloc] initWithArray:[sortArray sortedArrayUsingSelector:@selector(localizedStandardCompare:)]];
    
    [sortArray release];
    
    NSArray *sortArray2 = [[NSArray alloc] initWithArray:[[mypickervalues objectForKey:[wheelone objectAtIndex:component0]]allKeys]]; 
    
    wheeltwo = [[NSArray alloc] initWithArray:[sortArray2 sortedArrayUsingSelector:@selector(localizedStandardCompare:)]];
    [sortArray2 release];
    
    
        // setup uipicker and assign to myPicker
    myPicker = [self setupPicker];
    
        // Loads the data linked to the appropriate field in the table of data supplied.
    wheelthree = [[NSMutableArray alloc] initWithArray:[[mypickervalues objectForKey:[wheelone objectAtIndex:component0]] objectForKey:[wheeltwo objectAtIndex:component1]]];
    

    hope somebody can advise on the above code, but it seems to work ok for me so far

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

Sidebar

Related Questions

Need some help. I have a table with some columns..like name , phone etc...
Need some help, please. I have a line of horizontal thumbnails loaded as ONE
Need some help to solve this. I have a gridview and inside the gridview
Need some help from javascript gurus. I have one page where http://www.google.com/finance/converter is embedded
Need some help with a query.. I have three tables. Source id name 1
Need some help with DataFormatString in GridView. I have a Double value that needs
I'm new to Objetive-C and need some help, I have an Array with 22
I m new to iphone app development and i need some help. I have
I am relatively new to Objective C and need some array help. I have
Need some help with putting this query together. I'm using Mysql I have two

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.