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

beesbane

macrumors newbie
Original poster
Oct 16, 2010
21
0
Hi,

I have loaded in a plist, and nothing is crashing. I need to direct a UILabel to change to the plist's value, but can't seem to link that part right.

label.text = [valueForKey:mad:"value"];

This is right, but how do I tell it which item number in the list this is from?
beesbane is offline Reply With Quote
 
it is in a button action. I was just wondering if there was a way to call specifically in the plist:

item 0
title
"value for title"

how would that be written?
 
an Array and a String

Code:
- (id)initWithLibraryName:(NSString *)libraryName {
    if (self = [super init]) {
        libraryPlist = libraryName;
        libraryContent = [[NSArray alloc] initWithContentsOfFile:[[NSBundle mainBundle] 
                                                                  pathForResource:libraryPlist ofType:@"plist"]];
    }
    return self;
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.