{"id":16683921,"url":"https://github.com/meniny/boom","last_synced_at":"2025-03-13T12:26:50.141Z","repository":{"id":56903901,"uuid":"136158623","full_name":"Meniny/Boom","owner":"Meniny","description":"🎢 UITableView and UICollectionView manager with efficient, declarative and type-safe approach.","archived":false,"fork":false,"pushed_at":"2019-04-21T11:03:29.000Z","size":745,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-21T16:34:48.255Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","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/Meniny.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-05T10:08:32.000Z","updated_at":"2021-04-16T07:51:57.000Z","dependencies_parsed_at":"2022-08-21T01:50:49.145Z","dependency_job_id":null,"html_url":"https://github.com/Meniny/Boom","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meniny%2FBoom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meniny%2FBoom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meniny%2FBoom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meniny%2FBoom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Meniny","download_url":"https://codeload.github.com/Meniny/Boom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243403544,"owners_count":20285409,"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":[],"created_at":"2024-10-12T14:27:20.095Z","updated_at":"2025-03-13T12:26:50.118Z","avatar_url":"https://github.com/Meniny.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":":name: Boom\n:author: Elias Abel\n:author_esc: Elias%20Abel\n:mail: admin@meniny.cn\n:desc: an UITableView and UICollectionView manager with efficient, declarative and type-safe approach\n:icon: {name}.png\n:version: 1.1.0\n:na: N/A\n:ios: 9.0\n:macos: {na}\n:watchos: {na}\n:tvos: {na}\n:linux: {na}\n:xcode: 10.2\n:swift: 5\n:license: MIT\n:sep: %20%7C%20\n:platform: iOS\n// :toc: left\n:toclevels: 6\n:toc-title: TOC\n:source-highlighter: highlightjs\n// :source-highlighter: pygments\n= Meet `{name}`\n{author} \u003c{mail}\u003e\nv{version}, 2019-04-21\n\n[subs=\"attributes\"]\n++++\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./Assets/{icon}\" alt=\"{name}\" height=\"200px\"\u003e\n  \u003cbr/\u003e\u003cbr/\u003e\n  \u003cimg alt=\"Author\" src=\"https://img.shields.io/badge/author-{author_esc}-blue.svg\"\u003e\n  \u003cimg alt=\"EMail\" src=\"https://img.shields.io/badge/mail-{mail}-orange.svg\"\u003e\n  \u003cimg alt=\"MIT\" src=\"https://img.shields.io/badge/license-{license}-blue.svg\"\u003e\n  \u003cbr/\u003e\n  \u003cimg alt=\"Version\" src=\"https://img.shields.io/badge/version-{version}-brightgreen.svg\"\u003e\n  \u003cimg alt=\"Platforms\" src=\"https://img.shields.io/badge/platform-{platform}-lightgrey.svg\"\u003e\n  \u003cimg alt=\"Swift\" src=\"https://img.shields.io/badge/swift-{swift}%2B-orange.svg\"\u003e\n  \u003cbr/\u003e\n  \u003cimg alt=\"Build Passing\" src=\"https://img.shields.io/badge/build-passing-brightgreen.svg\"\u003e\n  \u003cimg alt=\"Cocoapods\" src=\"https://img.shields.io/badge/cocoapods-compatible-brightgreen.svg\"\u003e\n  \u003cimg alt=\"Carthage\" src=\"https://img.shields.io/badge/carthage-compatible-brightgreen.svg\"\u003e\n  \u003cimg alt=\"SPM\" src=\"https://img.shields.io/badge/spm-compatible-brightgreen.svg\"\u003e\n\u003c/p\u003e\n++++\n\n:toc:\n\n== 🏵 Introduction\n\n**{name}** is {desc}.\n\n== 📋 Requirements\n\n[%header]\n|===\n2+^m|Type 1+^m|Requirement\n\n1.5+^.^|Platform ^|iOS ^|{ios}+\n^|macOS ^|{macos}\n^|tvOS ^|{tvos}\n^|watchOS ^|{watchos}\n^|Linux ^|{linux}\n\n^|IDE ^|Xcode ^| {xcode}+\n^|Language ^|Swift ^| {swift}+\n|===\n\n== 📲 Installation\n\n=== CocoaPods\n\n`{name}` is available on link:https://cocoapods.org[CocoaPods].\n\n[source, ruby, subs=\"verbatim,attributes\"]\n----\nuse_frameworks!\npod '{name}'\n----\n\n=== Manually\n\nCopy all files in the `{name}` directory into your project.\n\n== 🛌 Dependency\n\n{na}\n\n== ❤️ Contribution\n\nYou are welcome to fork and submit pull requests.\n\n== 🔖 License\n\n`{name}` is open-sourced software, licensed under the link:./LICENSE.md[`{license}`] license.\n\n== 🔫 Usage\n\n=== Prepare Model\n\nFor example:\n\n[source, swift, subs=\"verbatim,attributes\"]\n----\nimport {name}\n\n// Confirm to BoomModel protocol\nstruct CellData: Equatable, Hashable, BoomModel {\n    var identifier: Int {\n        return id.hashValue\n    }\n\n    let id: String = NSUUID().uuidString\n\n    var avatar: UIImage\n    var title: String\n    var detail: String?\n\n    init(avatar: UIImage, title: String, detail: String?) {\n        self.avatar = avatar\n        self.title = title\n        self.detail = detail\n    }\n}\n----\n\n=== Prepare Cell\n\nFor example:\n\n[source, swift, subs=\"verbatim,attributes\"]\n----\nimport {name}\n\nclass ConversationTableViewCell: UITableViewCell {\n\n    @IBOutlet weak var titleLbale: UILabel!\n    @IBOutlet weak var avatarImageView: UIImageView!\n    @IBOutlet weak var subtitleLabel: UILabel!\n\n    override func awakeFromNib() {\n        super.awakeFromNib()\n\n        titleLbale.font = UIFont.boldSystemFont(ofSize: 20)\n        titleLbale.textColor = UIColor.darkText\n\n        subtitleLabel.font = UIFont.systemFont(ofSize: 15)\n        subtitleLabel.textColor = UIColor.lightGray\n    }\n\n}\n\n// Confirm to BoomCell protocol\nextension ConversationTableViewCell {\n    static var reuseIdentifier: String {\n        return \"ConversationTableViewCell\"\n    }\n\n    static var registerAsClass: Bool {\n        return false\n    }\n}\n----\n\n=== Generate Adapter\n\n[source, swift, subs=\"verbatim,attributes\"]\n----\nlet adapter = TableAdapter\u003cCellData, ConversationTableViewCell\u003e()\nadapter.on.dequeue = { ctx in\n    ctx.cell?.avatarImageView.image = ctx.model.avatar\n    ctx.cell?.titleLbale?.text = ctx.model.title\n    ctx.cell?.subtitleLabel?.text = ctx.model.detail\n}\nadapter.on.tap = { ctx in\n    print(\"Tapped on \\(ctx.model.identifier)\")\n    return .deselectAnimated\n}\ntableView.manager.register(adapter: adapter)\n----\n\n=== Generate Sections\n\n[source, swift, subs=\"verbatim,attributes\"]\n----\nlet dataSet: [CellData] = [...]\n\n// optional: Header\nlet header = TableSectionView\u003cTableExampleHeaderView\u003e()\nheader.on.height = { _ in\n    return 50\n}\n\n// optional: Footer\nlet footer = TableSectionView\u003cTableFooterExample\u003e()\nfooter.on.height = { _ in\n    return 30\n}\nfooter.on.dequeue = { ctx in\n    ctx.view?.titleLabel?.text = \"\\(dataSet.count) Data\"\n}\n\n// generate\nlet section = TableSection(headerView: header, footerView: footer, models: dataSet)\n\n// add to manager\ntableView.manager.add(section: section)\n----\n\n=== Setup Height for Rows\n\n[source, swift, subs=\"verbatim,attributes\"]\n----\ntableView.manager.rowHeight = .autoLayout(estimated: 100)\n----\n\n=== Reload\n\n[source, swift, subs=\"verbatim,attributes\"]\n----\ntableView.manager.reloadData(after: { _ in\n    return TableReloadAnimations.default()\n}, onEnd: nil)\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeniny%2Fboom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeniny%2Fboom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeniny%2Fboom/lists"}