forked from shadowfacts/Tusker
Fix no content message incorrectly appearing on profiles
Caused by a spurious appearance transition from embedChild
This commit is contained in:
parent
3d9477f0c9
commit
0c0180264e
|
@ -161,7 +161,15 @@ class ProfileViewController: UIViewController, StateRestorableViewController {
|
|||
// if old doesn't exist, we're selecting the initial view controller, so moving the header around isn't necessary
|
||||
new.initialHeaderMode = .createView
|
||||
new.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
embedChild(new)
|
||||
addChild(new)
|
||||
view.addSubview(new.view)
|
||||
NSLayoutConstraint.activate([
|
||||
new.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
||||
new.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
||||
new.view.topAnchor.constraint(equalTo: view.topAnchor),
|
||||
new.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
||||
])
|
||||
new.didMove(toParent: self)
|
||||
self.currentIndex = index
|
||||
state = .idle
|
||||
completion?(true)
|
||||
|
|
Loading…
Reference in New Issue