- (void)viewDidLoad
{
[super viewDidLoad]
{ FloorList = [NSArray arrayWithObjects:@"Floor One", @"Floor Two", @"Floor Three", nil];
FloorListAvailable = [NSArray arrayWithObject:@"10 Available", @"2 Available", @"0 Available", nil];
dict = [NSDictionary dictionaryWithObjects:FloorListAvailable forKeys:FloorList];
}
}
...cellForRowAtIndexPath:.....
cell.textLabel.text = [@"%", FloorList];
cell.detailTextLabel.text= [@"%", [dict objectForKey:FloorListAvailable]];
I have no clue what im doing right now. I just want a table view to show Floor 1 and in detailtextlabel to show the number available. I cant get that or understand how to get to that point. Thanks!
edit- I already have the table view made in storyboard and created a viewcontroller h and m file and this is being written in the FloorTableViewController.m file
Try this :
in your tebleView Delegate “cellForRowAtIndex” write this:
each time when cell is created it loads the object from array corresponding to the array values
Hope this will helps u