0

I made my prototype cell in the storyboard and setted its identifier, but when I call

cell=[tableView dequeueReusableCellWithIdentifier:@"ident" forIndexPath:indexPath];

in my cellForRowAtIndexPath method I get exception:

 unable to dequeue a cell with identifier ident - must register a nib or a class for the identifier or connect a prototype cell in a storyboard

Now, I know that, if I declare a prototype cell in storyboard, I don't need to explicitly register it. then...Why this exception?

Update: I post two images with show problem: enter image description here enter image description here

volperossa
  • 1,339
  • 20
  • 33

1 Answers1

1

try doing these..

remove these..

NSString *identificatore=@"voce";

and do these..

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
{
    static NSString *yourcellidentifier=@"cella_opzioni_menu";//here write the cell identifier you gave in storyboard..

    cell=[tableView dequeueReusableCellWithIdentifier:yourcellidentifier];

    if(cell == nil)
    {
         ........
    }

    .
    .
    .

}

i hope it helps..

krushnsinh
  • 874
  • 1
  • 10
  • 11