当导航栏隐藏时UIButton向上移动



我正在添加一个UIButton在视图的底部-

CGRect frame      = [UIScreen mainScreen].applicationFrame;
UIButton *menu_btn = [[UIButton alloc] initWithFrame:CGRectMake(xOffset, frame.size.height - 55, 55, 55)];
[self.view addSubview:menu_btn];

在视图中,我有UITableview,我在列表中向下滚动时隐藏导航栏,在向上滚动时显示。

menu_btn随着列表上下移动,我想修复这个按钮。

有没有人建议我,我怎么才能做到这一点?

我添加了navigationController。视图和它的工作很好。谢谢。

CGRect frame      = [UIScreen mainScreen].applicationFrame;
UIButton *menu_btn = [[UIButton alloc] initWithFrame:CGRectMake(xOffset, frame.size.height - 55, 55, 55)];
[self.navigationController.view addSubview:menu_btn];

最新更新