While expanding the tableview header ,view is expanding from the header and while collapsing , the view is moving behind the table header. You can found this issue by removing the header view background color . Could you please suggest me in the below scenario , I need the row to expand and collapse by keeping some distance from the tableview header.