Browse Source

Preview demo crash on visionOS

onevcat 2 years ago
parent
commit
00fa04ab4e

+ 2 - 1
Demo/Demo/Kingfisher-Demo/ViewControllers/TransitionViewController.swift

@@ -95,9 +95,10 @@ extension TransitionViewController: UIPickerViewDataSource {
     }
     
     func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
-        switch PickerComponent(rawValue: component)!  {
+        switch PickerComponent(rawValue: component)  {
         case .transitionType: return transitions.count
         case .duration: return durations.count
+        default: return 0
         }
     }
 }