 <p>The code is going into loop because tabellaMenu table in the cell has the delegate and datasource set to self. So, it keeps on calling table datasource methods on self and create new cells and enters into loop. </p> <p>You can either create a separate object(subclass of NSObject) and define the table delegate and datasource methods in that and set it to tabellaMenu's delegate and datasource.</p> <p>Or you can create a subclass of UITableViewCell and create a table view in that programatically. Define the table's datasource and delegate methods in that. So every table view in the cell will refer to its own cell for datasource and delegate. In addition, you get -(void)prepareForReuse(if the cell is reusable) to reload the table in the cell everytime the main table reloads.</p>