Hello,
I am getting a no visible interface error in the code below - I have highlighted the line in red. can anybody help ? thanks
regards
Kaps
I am getting a no visible interface error in the code below - I have highlighted the line in red. can anybody help ? thanks
regards
Kaps
Code:
//
// BIDViewController.m
// cells
//
// Created by Kapil Kapur on 03/09/2013.
// Copyright (c) 2013 Apress. All rights reserved.
//
#import "BIDViewController.h"
#import "BIDNameAndColorCell.h"
@interface BIDViewController ()
@end
@implementation BIDViewController
static NSString *CellTableIdentifier = @"CellTableIdentifier";
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.computers = @[
@{@"Name" : @"MacBook",@"Color":@"white"},
@{@"Name" : @"MacBook Pro ",@"Color":@"silver"},
@{@"Name" : @"iMac",@"Color":@"silver"},
@{@"Name" : @"MacMini",@"Color":@"silver"},
@{@"Name" : @"Mac Pro",@"Color":@"silver"}];
UITableView *tableView = (id)[self.view viewWithTag:1];
[COLOR="Red"][B] [tableView registerClass:[BIDNameAndColorCell class]
forCellReUseIdentifier:CellTableIdentifier];
[/B][/COLOR]
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark -
#pragma mark Table Data Source Methods
-(NSInteger)tableView:(UITableView *)tableView
numberOfRowsInSection:(NSInteger)section
{
return [self.computers count];
}
-(UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
BIDNameAndColorCell *cell = [tableView dequeueReusableCellWithIdentifier:CellTableIdentifier];
NSDictionary *rowData = self.computers[indexPath.row];
cell.name = rowData[@"Name"];
cell.color = rowData[@"Color"];
}
@end