Fixed a serious bug that header/footer was not laid out correctly. It was because autoresizing support was not set. Added an assertion to check it.