Skip to content

Ceylo/ListItemTracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ListItemTracking

ListItemTracking allows getting notified about all frame changes for the items in a SwiftUI List.

Minimal usage is as follow:

struct ContentView: View {
    var body: some View {
        GeometryReader { geometry in
            List(0..<100) { i in
                Text("Item \(i)")
                    .onItemFrameChanged(listGeometry: geometry) { (frame: CGRect?) in
                        print("rect of item \(i): \(String(describing: frame)))")
                    }
            }
            .trackListFrame()
        }
    }
}

About

Get notified about all frame changes for the items in a SwiftUI List.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages