I implemented a carousel with a collection view. I want to parse a JSON data into it, but the JSON parses after the necessary protocols. Because of this the array is empty when i try to configure the cells.
I know the problem occurs when I try to reload the data. When I do this in a table view controller I can just call tableView.reloadData() but I can't do this in the normal view controller I use.
self.view.setNeedsLayout()
self.view.layoutIfNeeded()
This is the order when i print it: loadjson numberofsections cellforitemat cellforitemat parsejson