You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wanting to implement a table view, which is populated by an API, in the drop down. I added a table to the XIB file and created another XIB file for the table cell.
Primary View Controller:
class EcardSingleCategoryViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout {
var ecards = Content
let imageCache = NSCache<NSString,AnyObject>()
@IBOutlet weak var ecardCollection: UICollectionView!
var name = ""
var id = ""
override func viewDidLoad() {
super.viewDidLoad()
let ZBdropDownViews = Bundle.main.loadNibNamed("EcardCategories", owner: nil, options: nil) as? [UIView]
let view = YNDropDownMenu(frame:CGRect(x: 0, y: 64, width: UIScreen.main.bounds.size.width, height: 64), dropDownViews: ZBdropDownViews!, dropDownViewTitles: ["Choose Category"])
self.view.addSubview(view)
}
In the initViews() function, I get the following error ... for the "categoryTable.register( ... " code
Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value
I'm not sure how I would go about calling the cell's XIB file and populate the data.
I am wanting to implement a table view, which is populated by an API, in the drop down. I added a table to the XIB file and created another XIB file for the table cell.
Primary View Controller:
In the initViews() function, I get the following error ... for the "categoryTable.register( ... " code
I'm not sure how I would go about calling the cell's XIB file and populate the data.
Drop Down code:
Cell Code:
Any help sorting through this would be great.
The text was updated successfully, but these errors were encountered: