iOS 11 large title navigation bar snaps instead of smooth transition

前端 未结 5 601
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-31 17:10

I\'m facing an issue where the large title navigation bar collapses very abruptly when scrolling on a UITableView embedded inside of a UIViewController. The problem seems to onl

5条回答
  •  忘掉有多难
    2021-01-31 18:02

    Soolar's answer is right, but I don't know how to fix it in storyboard. Finally I solved the problem with Roman's solution in another question, by adding:

    NSLayoutConstraint.activate([
        scrollView.topAnchor.constraint(equalTo: view.topAnchor),
        scrollView.leftAnchor.constraint(equalTo: view.leftAnchor),
        scrollView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
        scrollView.rightAnchor.constraint(equalTo: view.rightAnchor)
    ])
    

    in viewDidLoad.

    Original answer: https://stackoverflow.com/a/48321447/1386369

提交回复
热议问题