{"id":15035884,"url":"https://github.com/alibaba/lazyscrollview","last_synced_at":"2025-05-15T16:01:59.623Z","repository":{"id":52239700,"uuid":"83625066","full_name":"alibaba/LazyScrollView","owner":"alibaba","description":"An iOS ScrollView to resolve the problem of reusability in views.","archived":false,"fork":false,"pushed_at":"2020-01-04T07:40:06.000Z","size":162,"stargazers_count":1774,"open_issues_count":5,"forks_count":274,"subscribers_count":48,"default_branch":"master","last_synced_at":"2025-05-11T14:02:33.229Z","etag":null,"topics":["ios","lazyscrollview","reusability","scrollview","tangram"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alibaba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-02T02:30:22.000Z","updated_at":"2025-04-29T09:21:41.000Z","dependencies_parsed_at":"2022-08-20T21:50:16.952Z","dependency_job_id":null,"html_url":"https://github.com/alibaba/LazyScrollView","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2FLazyScrollView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2FLazyScrollView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2FLazyScrollView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2FLazyScrollView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alibaba","download_url":"https://codeload.github.com/alibaba/LazyScrollView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254374388,"owners_count":22060609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","lazyscrollview","reusability","scrollview","tangram"],"created_at":"2024-09-24T20:29:41.547Z","updated_at":"2025-05-15T16:01:59.603Z","avatar_url":"https://github.com/alibaba.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CocoaPods](https://img.shields.io/cocoapods/v/LazyScroll.svg)]() [![CocoaPods](https://img.shields.io/cocoapods/p/LazyScroll.svg)]() [![CocoaPods](https://img.shields.io/cocoapods/l/LazyScroll.svg)]()\n\n# LazyScrollView\n\n[中文说明](http://pingguohe.net/2016/01/31/lazyscroll.html)\n\n\u003e 基于 LazyScrollView，我们创造了一个动态创建模块化 UI 页面的解决方案，详情可见 [Tangram-iOS](https://github.com/alibaba/tangram-ios)。\n\nLazyScrollView is an iOS ScrollView, to resolve the problem of reusability of views.\n\nComparing to UITableView, LazyScrollView can easily create different layout, instead of the single row flow layout.\n\nComparing to UICollectionView, LazyScrollView can create views without Grid layout, and provides a easier way to create different kinds of layous in a ScrollView.\n\n\u003e We create a modular UI solution for building UI page dynamically based on `LazyScrollView`, you can see more info from this repo: [Tangram-iOS](https://github.com/alibaba/tangram-ios)\n\n# Installation\n\nLazyScroll is available as `LazyScroll` in CocoaPods.\n\n    pod 'LazyScroll'\n\nYou can also download the source files from [release page](https://github.com/alibaba/LazyScrollView/releases) and add them into your project manually.\n\n# Usage\n\n    #import \"TMMuiLazyScrollView.h\"\n    \nThen, create LazyScrollView:\n \n```objectivec\nTMMuiLazyScrollView *scrollview = [[TMMuiLazyScrollView alloc]init];\nscrollview.frame = self.view.bounds;\n```\n\nNext, implement `TMMuiLazyScrollViewDataSource`:\n \n```objectivec\n@protocol TMMuiLazyScrollViewDataSource \u003cNSObject\u003e\n\n@required\n\n// Number of items in scrollView.\n- (NSUInteger)numberOfItemInScrollView:(TMMuiLazyScrollView *)scrollView;\n\n// Return the view model (TMMuiRectModel) by index.\n- (TMMuiRectModel *)scrollView:(TMMuiLazyScrollView *)scrollView rectModelAtIndex:(NSUInteger)index;\n\n// Return view by the unique string that identify a model (muiID).\n// You should render the item view here.\n// You should ALWAYS try to reuse views by setting each view's reuseIdentifier.\n- (UIView *)scrollView:(TMMuiLazyScrollView *)scrollView itemByMuiID:(NSString *)muiID;\n\n@end\n```\n\nNext, set datasource of LazyScrollView:\n\n```objectivec\nscrollview.dataSource = self;\n```\n\nFinally, do reload:\n\n```objectivec\n[scrollview reloadData];\n```\n\nFor more details, please clone the repo and open the demo project. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2Flazyscrollview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falibaba%2Flazyscrollview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2Flazyscrollview/lists"}