iOS: adicione subvisualização com uma posição de correção na tela
Como faço para corrigir uma posição de subvisualização na tela (especialmente no UIScrollView e no UITableView)? Eu acho que no storyboard
[self.view addSubview:aSubView];
não funciona mais.
Alguma ideia?
EDITAR # 1: Eu estou usando um UITableViewController, não um simples UITableView.
EDITAR # 2:
CGRect fixedFrame = self.menuViewRelative.frame;
fixedFrame.origin.y = 0 + scrollView.contentOffset.y;
self.menuViewRelative.frame = fixedFrame;
menuViewRelative = [[UIView alloc] init];
menuViewRelative.backgroundColor = [UIColor grayColor];
menuViewRelative.frame = CGRectMake(0.0, 0.0, 320.0, 50.0);
[self.view addSubview:self.menuViewRelative];