-2

I am very new, as in I just started today with Objective C and I am getting this error every time I try to build my application.

Ticklist/RootTableViewController.m:69:36: No visible @interface for 'UITableView' declares the         selector 'initWithStyle:reuseIdentifier:'

for these lines of code

static NSString *simpleTableIdentfier = @"AnimalCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentfier];

if(cell == nil)
{
    cell =[[UITableView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentfier];
}

I am pretty good in java and I feel like this error is saying something along the lines of this variable hasn't been instantiated, even though I know this isn't a variable.

Im not asking for an answer verbatim, just a guidance in the right direction.

Thanks for any help.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
javaGeek
  • 304
  • 1
  • 4
  • 11
  • possible duplicate of [no @interface for 'UITableView' declares the selector 'initWithStyle:reuseIdentifiers](http://stackoverflow.com/questions/11361434/no-interface-for-uitableview-declares-the-selector-initwithstylereuseidenti) – jscs Mar 30 '14 at 21:28
  • See also [No visible @interface for](http://stackoverflow.com/q/10387330) – jscs Mar 30 '14 at 21:29
  • 1
    You are correct, it is a duplicate. Sorry for that and thank you for the guidance. – javaGeek Mar 30 '14 at 21:30

1 Answers1

0

UITableViewCellnot UITableView


cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentfier];

not

cell = [[UITableView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentfier];
Oliver Atkinson
  • 7,970
  • 32
  • 43