Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- NSString *sectionTitle = [aromaSectionTitles objectAtIndex:indexPath.section];
- NSArray *sectionAroma = [tableData objectForKey:sectionTitle];
- NSString *aromaLabel = [sectionAroma objectAtIndex:indexPath.row];
- NSLog(@"%@", aromaLabel);
- }
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- static NSString *simpleTableIdentifier = @"SimpleTableItem";
- UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier forIndexPath:indexPath];
- // Configure the cell...
- NSString *sectionTitle = [aromaSectionTitles objectAtIndex:indexPath.section];
- NSArray *sectionAroma = [tableData objectForKey:sectionTitle];
- NSString *aromaLabel = [sectionAroma objectAtIndex:indexPath.row];
- cell.textLabel.text = aromaLabel;
- if (cell == nil) {
- cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];
- }
- cell.textLabel.userInteractionEnabled = YES;
- cell.textLabel.tag = indexPath.row;
- return cell;
- }
Advertisement
Add Comment
Please, Sign In to add comment