{"id":19252213,"url":"https://github.com/bellapplab/loadable","last_synced_at":"2025-07-10T22:34:19.970Z","repository":{"id":36016322,"uuid":"40310981","full_name":"BellAppLab/Loadable","owner":"BellAppLab","description":"A small Swift library that adds convenience methods to UIKit classes so they handle loading remote data more easily.","archived":false,"fork":false,"pushed_at":"2018-10-28T09:57:05.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-18T12:52:28.593Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/BellAppLab.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":"2015-08-06T15:01:56.000Z","updated_at":"2020-10-16T09:02:13.000Z","dependencies_parsed_at":"2022-08-26T23:10:46.904Z","dependency_job_id":null,"html_url":"https://github.com/BellAppLab/Loadable","commit_stats":null,"previous_names":["bellapplab/uiloader"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/BellAppLab/Loadable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BellAppLab%2FLoadable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BellAppLab%2FLoadable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BellAppLab%2FLoadable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BellAppLab%2FLoadable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BellAppLab","download_url":"https://codeload.github.com/BellAppLab/Loadable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BellAppLab%2FLoadable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260096944,"owners_count":22958126,"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-11-09T18:25:53.042Z","updated_at":"2025-06-16T04:34:08.948Z","avatar_url":"https://github.com/BellAppLab.png","language":"Swift","readme":"# UILoader\n\nMake it easier to track the loading status of your objects.\n\n_v0.7.0_\n\n## Usage\n\nTransform this:\n\n```swift\nclass LameViewController: UIViewController\n{\n    @IBOutlet weak var activityIndicatorView: UIActivityIndicatorView?\n\n    private var isPerformingVeryLongBackgroundTask = false\n    func performVeryLongBackgroundTask() {\n        self.isPerformingVeryLongBackgroundTask = true\n        self.activityIndicatorView?.startAnimating()\n        doStuff { [weak self] _ in\n            if self?.isPerformingOtherVeryLongBackgroundTask == false {\n                self?.activityIndicatorView?.stopAnimating()\n            }\n            self?.isPerformingVeryLongBackgroundTask = false\n        }\n    }\n\n    private var isPerformingOtherVeryLongBackgroundTask = false\n    func performOtherVeryLongBackgroundTask() {\n        self.isPerformingOtherVeryLongBackgroundTask = true\n        self.activityIndicatorView?.startAnimating()\n        doOtherStuff { [weak self] _ in\n            if self?.isPerformingVeryLongBackgroundTask == false {\n                self?.activityIndicatorView?.stopAnimating()\n            }\n            self?.isPerformingOtherVeryLongBackgroundTask = false\n        }\n    }\n}\n```\n\n**Into this:**\n\n```swift\nclass CoolViewController: UIViewController, UILoader\n{\n    func didChangeLoadingStatus(_ loading: Bool) {\n        if loading {\n            //if you have a `UIActivityIndicatorView`, it will automatically start animating\n            //disable buttons\n            //do all sorts of stuff to your UI while you're loading things\n        } else {\n            //stop loading!\n            //get on with your life\n        }\n    }\n\n    //optional\n    @IBOutlet weak var activityIndicatorView: UIActivityIndicatorView?\n\n    func performVeryLongBackgroundTask() {\n        self.isLoading = true\n        doStuff { [weak self] _ in\n            self?.isLoading = false\n        }\n    }\n\n    func performOtherVeryLongBackgroundTask() {\n        self.isLoading = true\n        doOtherStuff { [weak self] _ in\n            self?.isLoading = false\n        }\n    }\n}\n```\n\n## Requirements\n\niOS 9.0+\nSwift 3.2\n\n## Installation\n\n### Cocoapods\n\nBecause of [this](http://stackoverflow.com/questions/39637123/cocoapods-app-xcworkspace-does-not-exists), I've dropped support for Cocoapods on this repo. I cannot have production code rely on a dependency manager that breaks this badly.\n\n### Git Submodules\n\n**Why submodules, you ask?**\n\nFollowing [this thread](http://stackoverflow.com/questions/31080284/adding-several-pods-increases-ios-app-launch-time-by-10-seconds#31573908) and other similar to it, and given that Cocoapods only works with Swift by adding the use_frameworks! directive, there's a strong case for not bloating the app up with too many frameworks. Although git submodules are a bit trickier to work with, the burden of adding dependencies should weigh on the developer, not on the user. :wink:\n\nTo install Backgroundable using git submodules:\n\n```\ncd toYourProjectsFolder\ngit submodule add -b submodule --name UILoader https://github.com/BellAppLab/UILoader.git\n```\n\n**Swift 2 support**\n\n```\ngit submodule add -b swift2 --name UILoader https://github.com/BellAppLab/UILoader.git\n```\n\nThen, navigate to the new Backgroundable folder and drag the `Source` folder into your Xcode project.\n\n## Author\n\nBell App Lab, apps@bellapplab.com\n\n## License\n\nBackgroundable is available under the MIT license. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbellapplab%2Floadable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbellapplab%2Floadable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbellapplab%2Floadable/lists"}