To run the example project, clone the repo, and run pod install from the Example directory first. or just use terminal command pod try SSLazyList
With SSLazyList, you can use an optional array of data models and configure the list easily:
import SSLazyList
//...
@State var users: [UserModel]?
var config: SSConfigLazyList {
let configuration = SSConfigLazyList(animator: .auto(.bouncy, .always))
return configuration
}
//...
SSLazyList(data: users, rowContent: { user in
UserDetailCell(user: user)
}, configuration: config)
//...The data model should implement the Identifiable protocol, just like what's needed for a standard SwiftUI List.
SSLazyList is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SSLazyList', '~> 1.0.0'and in your code add import SSLazyList.
When using Xcode 14 or later, you can install SSLazyList by going to your Project settings > Swift Packages and add the repository by providing the GitHub URL. Alternatively, you can go to File > Swift Packages > Add Package Dependencies...
dependencies: [
.package(url: "https://github.com/smartSenseSolutions/SSLazyList.git", .upToNextMajor(from: "1.0"))
]- iOS v15.0+
- Swift v5.0+
- SwiftUI
- XCode v14+
SSLazyList does not collect any kind of data in anyway.
We welcome contributions! Please see our contributing guidelines for more details.
SmartSense Consulting Solutions Pvt. Ltd., [email protected]
The SwiftUI LazyList Library is available under the MIT license. See the LICENSE file for more information.