{"id":18073960,"url":"https://github.com/levibostian/pleasehold-ios","last_synced_at":"2025-04-05T18:40:40.517Z","repository":{"id":35056569,"uuid":"201378329","full_name":"levibostian/PleaseHold-iOS","owner":"levibostian","description":"Quick and easy progress UIView to place in your app.","archived":false,"fork":false,"pushed_at":"2023-01-09T22:30:56.000Z","size":292,"stargazers_count":2,"open_issues_count":9,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-13T06:34:27.390Z","etag":null,"topics":["cocoapods","ios","ios-lib","progress-bar","swift","uiview"],"latest_commit_sha":null,"homepage":"https://levibostian.github.io/PleaseHold-iOS/","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/levibostian.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-08-09T03:02:02.000Z","updated_at":"2024-09-19T07:06:23.000Z","dependencies_parsed_at":"2023-01-15T12:54:08.529Z","dependency_job_id":null,"html_url":"https://github.com/levibostian/PleaseHold-iOS","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levibostian%2FPleaseHold-iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levibostian%2FPleaseHold-iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levibostian%2FPleaseHold-iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levibostian%2FPleaseHold-iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levibostian","download_url":"https://codeload.github.com/levibostian/PleaseHold-iOS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247385357,"owners_count":20930590,"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":["cocoapods","ios","ios-lib","progress-bar","swift","uiview"],"created_at":"2024-10-31T10:10:45.581Z","updated_at":"2025-04-05T18:40:40.494Z","avatar_url":"https://github.com/levibostian.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/levibostian/PleaseHold-iOS.svg?branch=master)](https://travis-ci.com/levibostian/PleaseHold-iOS)\n[![Version](https://img.shields.io/cocoapods/v/PleaseHold.svg?style=flat)](https://cocoapods.org/pods/PleaseHold)\n[![License](https://img.shields.io/cocoapods/l/PleaseHold.svg?style=flat)](https://cocoapods.org/pods/PleaseHold)\n[![Platform](https://img.shields.io/cocoapods/p/PleaseHold.svg?style=flat)](https://cocoapods.org/pods/PleaseHold)\n![Swift 5.0.x](https://img.shields.io/badge/Swift-5.0.x-orange.svg)\n\n# PleaseHold\n\nQuick and easy progress UIView to place in your app.\n\n*Android developer? Check out [the Android version of PleaseHold!](https://github.com/levibostian/pleasehold-android)*\n\n## What is PleaseHold?\n\nIn the moments when you need to show a blocking progress UIView in your app, PleaseHold is a quick way to put one in your app. Configured with default settings that will work for most use cases, but customizable enough to cover more. Do us all a favor, and avoid blocking views as much as you can 😉.\n\n![screenshot](misc/example_screenshot.png)\n\n## Why use PleaseHold?\n\n* Swift API\n* Lightweight. Zero dependencies. \n* UI testing friendly. \n* Setup with default values that should work for 95% of your use cases. Customizable for those other cases. \n* Full test suite. [![Build Status](https://travis-ci.com/levibostian/PleaseHold-iOS.svg?branch=master)](https://travis-ci.com/levibostian/PleaseHold-iOS)\n* [Full documentation](https://levibostian.github.io/PleaseHold-iOS/). \n\nI recommend you check out 2 other libraries that work nicely with PleaseHold: [Empty](https://github.com/levibostian/Empty-iOS) and [Swapper](https://github.com/levibostian/Swapper-iOS).\n\n## Installation\n\nPleaseHold is available through [CocoaPods](https://cocoapods.org/pods/PleaseHold). To install it, simply add the following line to your Podfile:\n\n```ruby\npod 'PleaseHold', '~\u003e version-here'\n```\n\nReplace `version-here` with: [![Version](https://img.shields.io/cocoapods/v/PleaseHold.svg?style=flat)](https://cocoapods.org/pods/PleaseHold) as this is the latest version at this time. \n\n# Getting started\n\n* Create an instance of `PleaseHoldView` in your `UIViewController`. You can do this with Storyboard by adding a `UIView` to Storyboard and setting the `UIView` class to `PleaseHoldView`, or create an instance in your Swift code:\n\n```swift\nlet pleaseHoldView: PleaseHoldView = {\n    let view = PleaseHoldView()\n    view.title = nil // title is optional \n    view.message = nil // message is optional \n    view.translatesAutoresizingMaskIntoConstraints = false    \n    return view\n}()\n```\n\n* Add the `PleaseHoldView` to your `UIViewController`. Pretty simple. \n\nIf you want to change the text of the title or message `UILabel`s, you can change them at runtime:\n\n```swift\npleaseHoldView.title = \"New title\"\npleaseHoldView.message = \"New message\"\n```\n\nOr, if you want to hide one of the labels, you can just set `nil`:\n\n```swift\npleaseHoldView.title = nil \npleaseHoldView.message = nil \n```\n\n# Configure PleaseHold \n\nPleaseHold works great without any configuration necessary. However, if you wish to customize it yourself, you can. \n\nIf you want to change the default values of all instances of `PleaseHold` in your app, change the values in the default singleton:\n\n```swift\nPleaseHold.defaultConfig.viewPadding = 10.0\n```\n\nOr, you can configure 1 single instance of `PleaseHold`:\n\n```swift\nlet pleaseHoldView = PleaseHoldView()\npleaseHoldView.config.newTitleLabel = {\n    let label = PleaseHoldViewConfig.defaultTitleLabel\n    label.textColor = .blue\n    return label\n}\npleaseHoldView.title = \"Set title here, it will have blue text color!\"\n```\n\nTo make re-useable configurations for `PleaseHoldView`, it's recommended to create an `PleaseHoldViewConfigPresent`:\n\n```swift\n/// Convenient set of `UIView`s that are dark in color. Great for light colored backgrounds.\npublic struct DarkPleaseHoldViewConfigPreset: PleaseHoldViewConfigPreset {\n    /// Dark colored title label.\n    public var titleLabel: UILabel {\n        let label = PleaseHoldViewConfig.defaultTitleLabel\n        label.textColor = .darkText\n        return label\n    }\n\n    /// Dark colored message label.\n    public var messageLabel: UILabel {\n        let label = PleaseHoldViewConfig.defaultMessageLabel\n        label.textColor = .darkText\n        return label\n    }\n\n    /// Dark colored activity indicator.\n    public var activityIndicator: UIActivityIndicatorView {\n        let indicator = PleaseHoldViewConfig.defaultActivityIndicator\n        indicator.style = .gray\n        return indicator\n    }\n}\n\nlet pleaseHoldView = PleaseHoldView()\npleaseHoldView.config = DarkPleaseHoldViewConfigPreset().config\n```\n\nFor convenience, `PleaseHold` comes with a light and dark colored present: `DarkPleaseHoldViewConfigPreset` and `LightPleaseHoldViewConfigPreset` that you can use or extend. \n\nThere are many things you can configure for `PleaseHold`. For a list of all the configuration options, view the [docs on PleaseHoldViewConfig](https://levibostian.github.io/PleaseHold-iOS/Classes/PleaseHoldViewConfig.html)\n\n## Example\n\nPleaseHold comes with an example app you can use to play with the library. To run the example project, clone the repo, and run `pod install` from the Example directory first. Then, open the workspace in XCode. \n\n## Development \n\nPleaseHold is a pretty simple CocoaPods library project. Follow the directions below for the optimal development experience. \n\n* Install cocoapods/gems and setup workspace:\n\n```bash\n$\u003e bundle install\n$\u003e cd PleaseHold/Example\n$\u003e pod install\n```\n\n* Setup git hooks [via overcommit](https://github.com/brigade/overcommit/) to run misc tasks for you when using git. \n\n```bash\n$\u003e overcommit --install\n```\n\n## Author\n\n* Levi Bostian - [GitHub](https://github.com/levibostian), [Twitter](https://twitter.com/levibostian), [Website/blog](http://levibostian.com)\n\n![Levi Bostian image](https://gravatar.com/avatar/22355580305146b21508c74ff6b44bc5?s=250)\n\n## Contribute\n\nPleaseHold is open for pull requests. Check out the [list of issues](https://github.com/levibostian/PleaseHold-ios/issues) for tasks I am planning on working on. Check them out if you wish to contribute in that way.\n\n**Want to add features to PleaseHold?** Before you decide to take a bunch of time and add functionality to the library, please, [create an issue](https://github.com/levibostian/PleaseHold-iOS/issues/new) stating what you wish to add. This might save you some time in case your purpose does not fit well in the use cases of PleaseHold.\n\n## License\n\nPleaseHold is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevibostian%2Fpleasehold-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevibostian%2Fpleasehold-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevibostian%2Fpleasehold-ios/lists"}