@LocoMike's answer best fitted my tableView, however it broke when using footers as well.So, this is the corrected solution when using headers and footers:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ return (self.sections.count + 1) * 3;}- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ if (section % 3 != 1) { return 0; } section = section / 3; ...}- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{ if (section % 3 != 0) { return nil; } section = section / 3; ...}- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ if (section % 3 != 0) { return 0; } section = section / 3; ...}- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{ if (section % 3 != 2) { return 0; } section = section / 3; ...}- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ if (section % 3 != 0) { return nil; } section = section / 3; ...}- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{ if (section % 3 != 2) { return nil; } section = section / 3; ...}- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ int section = indexPath.section; section = section / 3; ...}