Fix background color during transition
In Dark Mode the transition into a folder and back started and ended with a very noticeable white flicker. Now, the color will be updated before every transition.
This commit is contained in:
parent
54e104d2f0
commit
4bed5fcf8b
1 changed files with 11 additions and 0 deletions
|
|
@ -101,6 +101,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
||||||
transition.fillMode = CAMediaTimingFillMode.forwards
|
transition.fillMode = CAMediaTimingFillMode.forwards
|
||||||
transition.duration = 0.25
|
transition.duration = 0.25
|
||||||
transition.subtype = CATransitionSubtype.fromRight
|
transition.subtype = CATransitionSubtype.fromRight
|
||||||
|
transition.delegate = self
|
||||||
return transition
|
return transition
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
@ -111,6 +112,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
||||||
transition.fillMode = CAMediaTimingFillMode.forwards
|
transition.fillMode = CAMediaTimingFillMode.forwards
|
||||||
transition.duration = 0.25
|
transition.duration = 0.25
|
||||||
transition.subtype = CATransitionSubtype.fromLeft
|
transition.subtype = CATransitionSubtype.fromLeft
|
||||||
|
transition.delegate = self
|
||||||
return transition
|
return transition
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
@ -675,8 +677,17 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
||||||
}
|
}
|
||||||
|
|
||||||
extension PasswordsViewController: UISearchResultsUpdating {
|
extension PasswordsViewController: UISearchResultsUpdating {
|
||||||
|
|
||||||
func updateSearchResults(for searchController: UISearchController) {
|
func updateSearchResults(for searchController: UISearchController) {
|
||||||
let scope = SearchBarScope(rawValue: searchController.searchBar.selectedScopeButtonIndex) ?? .all
|
let scope = SearchBarScope(rawValue: searchController.searchBar.selectedScopeButtonIndex) ?? .all
|
||||||
filterContentForSearchText(searchText: searchController.searchBar.text!, scope: scope)
|
filterContentForSearchText(searchText: searchController.searchBar.text!, scope: scope)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension PasswordsViewController: CAAnimationDelegate {
|
||||||
|
|
||||||
|
func animationDidStart(_ anim: CAAnimation) {
|
||||||
|
view.window?.backgroundColor = Colors.systemBackground
|
||||||
|
view.layer.backgroundColor = Colors.systemBackground.cgColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue