nicklockwood / iCarousel

A simple, highly customisable, data-driven 3D carousel for iOS and Mac OS
http://www.charcoaldesign.co.uk/source/cocoa#icarousel
Other
11.99k stars 2.58k forks source link

Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value #871

Open majdalrifai opened 5 years ago

majdalrifai commented 5 years ago

Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value after the code iCarouselView.type = .cylinder

This code is under override func viewDidLoad() {

nicklockwood commented 5 years ago

@majdalrifai iCarousel is written in Objective-C, and that error can only be generated by Swift code.

My guess is that you have created an implicitly unwrapped @IBOutlet for your iCarouseView, and that this hasn’t been correctly hooked up in your Storyboard so that it’s nil at the point when you try to set the type property.