My problem is this: my application has a screen that uses the UITableViewController layout. I created a header (View) for this screen, however, the header does not stay fixed at the top of the screen. That is, when I drag the screen up / down, the header also moves up / down. My question is is there any way to keep a subview fixed at the top of the screen, and is this subview in UITableViewController?
ps: I tried this solution but it did not work.
override func scrollViewDidScroll (scrollView: UIScrollView) {
var fixedFrame: CGRect = self.uiTopView.frame;
fixedFrame.origin.y = scrollView.contentOffset.y;
self.uiTopView.frame = fixedFrame;
}