UITableView as inputView not showing in UICollectionView cell

133 Views Asked by At

I am having a really weird problem in developing my iOS app. Here's the situation:

I have a view controller that was created in Storyboard, and that VC has a UICollectionView in it. This storyboard VC corresponds to a VC file that we can call MyViewController. The file MyViewController.swift contains the class MyViewController and class MyViewControllerCell. Inside each MyViewControllerCell there is a TextFieldValidator object (basically a text field) with an inputView set to a UITableView. The MyViewControllerCell class also has tableView methods for getting the data.

I should have a total of around 6 or 7 items that must be shown in my UICollectionView, and they all show correctly. However, it SHOULD be the case that when I click on the textfield in any given cell, that there should be a table selection that shows at the bottom of the screen. However, strangely enough, this does indeed happen ONLY if I first scroll the collection view all the way to the bottom so that all 6 or 7 cells get loaded. If I do not do this (ie if I just click on the text field when it first loads and only shows the first 3 cells) then the table view picker/modal does not show at the bottom. Only if I first scroll and load all cells will clicking on any cell's textfield then show this modal table of options.

Any idea what could be going wrong? Is there a way to force load all cells just to make sure?

I am using swift 2 and XCode 7.3

0

There are 0 best solutions below