It is like that the property of header.top was set as "Superview.top margin", when i changed it to "Superview.top", it worked.