0

In table view controller. I have number rows and I'm using Auto-layout to manage the components in prototype-cell.

Requirement: Need to hide few rows based on user input.

Problem: When I hide the cell then grey area appeared thus I had to use Height of Row method to return 0 if row is hidden but for the enabled rows else I am using UITableViewAutomaticDimension row height for each cell so that height can be calculated dynamically as per the requirement.

Goal: Need to hide few rows and show few rows as per the dynamic requirement. I need to use Self Resizing feature so that cell height is automatically calculated as per its components.

Any suggestion?

Charuක
  • 12,953
  • 5
  • 50
  • 88
Farrukh Qamar
  • 93
  • 1
  • 10
  • Explain more your question. – dahiya_boy Dec 24 '16 at 11:49
  • In table view controller. I have number rows.They are being printed with the help of self resizing enabled (Auto Layout) Requirement: Need to hide few rows based on user input Problem: When i hide then grey area appeared thus i had to use Height of Row method to return 0 if row is hidden but for the enabled rows I want to use self resizing instead of giving my own height. Thus i need to use height of row in some rows and self resizing feature in some others (iOS Swift 3) – Farrukh Qamar Dec 24 '16 at 12:21
  • Can you show me your UI ScreenShot so that i give answer more precisely. and add your code of work also, so that I can estimate the mistake. – dahiya_boy Dec 24 '16 at 12:25
  • PLease show some screenshots. and constraints of your cell as well. – Umair Afzal Dec 28 '16 at 13:41

1 Answers1

0

just return 0 in your tableview's delegate method didSelectRow whenever you want to hide this cell

Punit
  • 1,330
  • 6
  • 13