0 votes
649 views
asked in Swift by (4k points)
edited by

Hi

   I am getting the following error while assinging the value to UIlabel in custom UICOollectioncell..

Error

fatal error: unexpectedly found nil while unwrapping an Optional value

Code 

   @IBOutlet var feedContentSnippet: UILabel!

func initValue(labelValue:String){

        feedContentSnippet.text = labelValue;

    }

1 Answer

0 votes
answered by (4.2k points)

HI

 UICollectionViewCell inside StoryBoard don't need to registerClass, just choose reuseidentifier in StoryBoard. Delete this line:

   // [self.workoutView registerClass:[Cell class] forCellWithReuseIdentifier:@"Cell"];

And make sure you connect right way;

-Type the reuse identifier

Categories

...