Use auto layout, Make canvas first on top in the auto layout settings. Make you header a component with closed and open state, make sure both states has the same heigh in their top layer.
Make prototype in the component. then place it into design. turn off Clip content for the header and Boom you have it