I have a UITableView with custom cell. I have created seperate class with xib for the tableviewcell. in tableviewcell i have added a UIView, because i want to add different uiviews in the tableview.
Now I have 2 views which i want to add based on my data to the tableviewcell. i,e; if my data support view1, then i am adding view1 in an array which will be used to draw the table view & in table view drawing i am simply writing like this:
cell.parentView = [dailyExpenseViewArray objectAtIndex:indexPath.row];
Daily Expense View array is an array of views of type 1 & 2. Parent view is the UIview object inside tableviewcell.
My problem is i am having the view array perfectly. but in the tableview, it is showing blank rows. although the number of rows are drawn, but with blank views.
Any help would be appreciated. Thanks in advance.
I’m not sure I fully understand your problem without seeing some more code, however I think it may be an issue with the way you’re trying to display the UIView inside the cell. Have you tried the following: