0

I'm currently writing an app and I need to display a chart of some kind. I created another TableViewController and used it's cell as Bar Chart items.

The question is:

When I try to present it from the main Controller, it throws the Signal Sigbart. Why?

Everything works just fine , for example, if I comment out the present(ViewController) line, and say something like print(123) it's all good. Anyway, here's the code that's causing the problem

enter image description here

BarCharController

enter image description here

Stack Trace

enter image description here

Thank you. I hoped I posted all the details!!

  • can you post the stack trace? – willermo Jan 23 '18 at 18:45
  • isn't it obvious in the error message? Always search for words like **resaon**, **error**, **conflict**. Here it says: **Reason: UICollectionView must be initialized with a non-nil layout parameter**. So please show us how you have initialized your collectionView – mfaani Jan 23 '18 at 18:51
  • My bad. I'm not yet used to the debugger in XCode. I was following a tutorial and he was using this as his main Controller. I apologize for the inconvenience . Could you help me with the init for this ? I have the required one already. I'm still learning :( – Mihai Cadis Jan 23 '18 at 19:05
  • use the `@` to mention users so others would be notified. But as for how to instantiate. Did you see [this answer](https://stackoverflow.com/a/35390967/5175709)? If that doesn't work then update your question with the code you tried... – mfaani Jan 23 '18 at 19:47

0 Answers0