Update not found print to include missing ID

This commit is contained in:
Andrew Breckenridge 2020-07-23 00:13:53 -07:00 committed by GitHub
parent 82a0087388
commit aee548b80e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ public struct ScrollViewProxy<ID: Hashable> {
public func scrollTo(_ id: ID, alignment: Alignment = .top, animated: Bool = true) {
guard let scrollView = coordinator.scrollView else { return }
guard let cellFrame = coordinator.frames[id] else {
return print("ID not found, make sure to add views with `.id(_:scrollView:)`")
return print("ID (\(id)) not found, make sure to add views with `.id(_:scrollView:)`")
}
let visibleFrame = frame(cellFrame, with: alignment)