I have created a custom cell for my TableView to show 1 ~ 5 rows of information in each cell. So, I have to create UILabels and UISwitches for each row of data in code, and Add them as subViews to my custom cell.
I tried to add UI Controls in cellForRowAtIndexPath method before returning the custom cell with no success. Tried to add a viewDidLoad method in my customCell.m file and create controls in it, but UITableViewCell does not have a viewDidLoad method.
Where should I create UIs and how can I add them to customCell?
I have created a custom cell for my TableView to show 1 ~ 5
Share
In this if you subclassed UITableViewCell:
And add UI elements to self.contentView as subviews while you are in this function.