0

How to decrese the height of ViewController from the bottom when I untap the HeaderView i.e. "Discounts and Cashbacks", "Product Description" and "Instructions". When we tap these 3 header views then automatically set the height of view controller according their text.

Tap on 1st HeaderView "Discount and Cashback"

Tap on 2nd HeaderView "Product Desc"

Tap on 3rd HeaderView "Instruction"

move up the tableview cells

when untap the header views

NSPratik
  • 4,714
  • 7
  • 51
  • 81
Bar Uncle
  • 1
  • 3
  • Use AutolayOut or calculate the viewHeight on basis of content and update height constraint. – Daljeet Dec 22 '17 at 06:36
  • @bar-uncle : Create a tableView, add section header view for each section header add tap gesture recognizer to each header view. Set the number OfRwos for each section as 0. when tapped set the number of row's section for that particular section header to non zero number to expand the tableView. Simple as that – Sandeep Bhandari Dec 22 '17 at 06:51

0 Answers0