Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Fazzl

macrumors 6502a
Original poster
Aug 13, 2007
580
4
I have an app that shows two table views: a first view and a second view that is pushed when you click a cell in the first table.

For example, first view shows muscles (bicep, chest, arms, etc). When you click a cell (say bicep), it pushes into a table that shows specific exercises for the bicep.

I currently have it working with arrays and separate class table view controllers for all muscles but its too many files and not optimized.

I have now put all the data into a plist like this and want to fill the two tables accordingly but it is not working. Any suggestions?

mxxje1s7ok.png
 
Last edited:
I have now put all the data into a plist like this and want to fill the two tables accordingly but it is not working. Any suggestions?
Yes. Please explain what you mean by "it is not working". That's far too vague for us to provide much help and we are not mind readers. Are you getting warning/errors? Is it crashing? If so, what does the crash log say? Etc.

P.S. Perhaps you should start by reading over these two blog articles: Getting Answers and What Have You Tried?.
 
Yes. Please explain what you mean by "it is not working". That's far too vague for us to provide much help and we are not mind readers. Are you getting warning/errors? Is it crashing? If so, what does the crash log say? Etc.

P.S. Perhaps you should start by reading over these two blog articles: Getting Answers and What Have You Tried?.

The problem I am having is that the plist I posted above is not loading into the tables, although a plist with a list of strings of muscle names successfully loads into the muscle table view.

Bascially, it is loading this plist fine:
7h5t9esuog.png


But I want i to load from this plist, because it has the exercises in it as well.
mxxje1s7ok.png


And this is the current method I have to load from the original plist. I think it needs to be changed to let it load from the new plist values called name.

Code:
- (void)viewDidLoad
{
    
    if (excerciseArray == nil)
    {
        NSString *path = [[NSBundle mainBundle]pathForResource:@"muscles" ofType:@"plist"];
        NSMutableArray *array = [[NSMutableArray alloc]initWithContentsOfFile:path];
        self.excerciseArray = array;
        [array release];
    }
 
Last edited by a moderator:
problem solved, thanks!
 
Last edited:
having same problem

mate i am making some what same app for my college project and i am having problem when i go from one table view to another. can you help me how to resolve it?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.