iOS: Add subview with a fix position on screen

后端 未结 4 1598
执念已碎
执念已碎 2021-01-01 04:17

How do I fix a subviews position on screen (especially in UIScrollView and UITableView)? I think in storyboard

[self.view addSubview:aSubView];
4条回答
  •  春和景丽
    2021-01-01 04:56

    Can you just add your subview into the window, like:

    [self.view.window addSubview:mySubView];
    

    It works for me. I added a pix position info view in a dynamic table view.

提交回复
热议问题