Mix the flour and salt in a bowl. Add the butter, rub in by hand until an even, crumbly mixture forms. Pour in the water, mix quickly to create a soft dough (do not knead), flatten, cover and chill for approx. 30 mins. Roll out the dough to a thickness of approx. 2 mm, place in the prepared tin, pull the dough up evenly around the edges of the tin, fold the protruding dough inwards.
Heat the butter in a pan, sauté the leek. Add the water, season with salt, cover and simmer the leek for approx. 5 mins. until soft. Remove the lid and reduce the liquid, leave to cool.
Season the potatoes. Layer the leek, 2/3 of the potatoes, 2/3 of the apples and the cheese in the tin. Arrange the remainder of the potatoes and apples on top so that they overlap a little.
Brush the potatoes and apples with butter.
Bake for approx. 40 mins. in the lower half of an oven preheated to 200°C. Remove from the oven, place the tin on a cooling rack, allow to cool slightly. Remove the tin frame.