Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ios - copyWithZone:]: unrecognized selector sent to instance

I want to create a copy of cell object.. Following is my code but retrieving copyWithZone:]: unrecognized selector sent to instance

  CollectionCell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"KCell" forIndexPath:indexPath];

        if(kCell == nil)
        {


            cell = [self getiPadCell:indexPath cv:cv dict:dict];
            kCell = cell;
            return cell;
        }
        else
        {
            cell = [kCell copy];
            return cell;
        }
like image 383
Arahim Avatar asked Apr 24 '14 07:04

Arahim


1 Answers

Your CollectionCell class should provide implementation of copyWithZone: method. Also it should conform to NSCopying protocol. Think of how you'd like to copy your cell and provide proper implementation. This Link may help you to understand it better

like image 111
Andrey Chernukha Avatar answered Oct 19 '22 13:10

Andrey Chernukha