UIScrollView's origin changes after popping back to the UIViewController

后端 未结 17 2216
不知归路
不知归路 2020-12-07 16:50

I have a UIViewController subclass as a scene in the storyboard that contains a UIScrollView containing various subviews. One of the subviews is a

17条回答
  •  有刺的猬
    2020-12-07 17:08

    Just in case none of the above helped, I had this issue as well as the issue for me was that i had the following code..

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        tableView.reloadData()
    }
    

    Commenting out this reloadData() line fixed the issue for me. I didn't need this line so not sure why i even added it!

    Hopefully this solution helps someone else.

提交回复
热议问题