{"id":13462676,"url":"https://github.com/MarioIannotta/ShyView","last_synced_at":"2025-03-25T05:32:12.808Z","repository":{"id":40366398,"uuid":"484183860","full_name":"MarioIannotta/ShyView","owner":"MarioIannotta","description":"A UI component that avoids screenshots and recordings","archived":false,"fork":false,"pushed_at":"2023-12-27T12:33:47.000Z","size":6875,"stargazers_count":195,"open_issues_count":2,"forks_count":9,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-17T11:11:24.942Z","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/MarioIannotta.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-04-21T19:44:23.000Z","updated_at":"2025-02-12T06:39:40.000Z","dependencies_parsed_at":"2024-01-16T05:10:12.412Z","dependency_job_id":"7928d76f-9e91-4269-9a91-8d48f9fd752b","html_url":"https://github.com/MarioIannotta/ShyView","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"6286f31021a78b38470569fbb48dde61893d7e04"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioIannotta%2FShyView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioIannotta%2FShyView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioIannotta%2FShyView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioIannotta%2FShyView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarioIannotta","download_url":"https://codeload.github.com/MarioIannotta/ShyView/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245407535,"owners_count":20610226,"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-07-31T13:00:18.736Z","updated_at":"2025-03-25T05:32:11.358Z","avatar_url":"https://github.com/MarioIannotta.png","language":"Swift","funding_links":[],"categories":["截屏防护方案"],"sub_categories":[],"readme":"![ShyView: A UI component that avoids screenshots and recordings](https://raw.githubusercontent.com/MarioIannotta/ShyView/main/Resources/ShyView.jpg)\n\n# ShyView\n\n[![SwiftPM 5.3](https://img.shields.io/badge/SwiftPM-5.6-ED523F.svg?style=flat)](https://swift.org/download/) [![Version](https://img.shields.io/cocoapods/v/ShyView.svg?style=flat)](https://cocoapods.org/pods/ShyView) [![License](https://img.shields.io/cocoapods/l/ShyView.svg?style=flat)](https://cocoapods.org/pods/ShyView) [![Platform](https://img.shields.io/cocoapods/p/ShyView.svg?style=flat)](https://cocoapods.org/pods/ShyView)\n\n\u003cimg src=\"https://raw.githubusercontent.com/MarioIannotta/ShyView/main/Resources/Demo.gif\" height=\"500\" width=\"300\"/\u003e\n\n## Installation\n\nShyView is available through SwiftPM.\n\n### SwiftPM\n\nAdd the package to your dependencies\n\n```swift\n.package(\n  name: \"ShyView\",\n  url: \"https://github.com/MarioIannotta/ShyView.git\",\n  .upToNextMinor(\"0.2.0\")\n)\n```\n\nAdd package product to your targets\n\n```swift\n.product(\n  name: \"ShyView\",\n  package: \"ShyView\"\n)\n```\n\n### Pods\n\nShyView is available through [CocoaPods](https://cocoapods.org). To install it, simply add the following line to your Podfile:\n\n```ruby\npod 'ShyView'\n```\n\n## Usage\n\nSimply Wrap the view you want not to be screenshotted (or recorded) in a `ShyView`.\n\n```swift\nlet topSecretLabel = UILabel()\ntopSecretLabel.text = \"4, 8, 15, 16, 23, 42\"\n\nlet shyView = ShyView(topSecretLabel)\nview.addSubview(topSecretLabel)\n// Configure layout for topSecretLabel\n```\n\nThere is also a helper for the implicit content protection\n\n```swift\nlet topSecretLabel = UILabel()\ntopSecretLabel.text = \"4, 8, 15, 16, 23, 42\"\n\nview.addSubview(topSecretLabel.privacySensitive())\n// Configure layout for topSecretLabel\n```\n\nOr use `ShyView` as a container for some custom content\n\n```swift\nlet topSecretLabel = UILabel()\ntopSecretLabel.text = \"4, 8, 15, 16, 23, 42\"\n\nlet shyView = ShyView()\nview.addSubview(shyView)\nshyView.contentView.addSubview(topSecretLabel)\n// Configure layout for shyView, topSecretLabel\n// and any other added views independently\n```\n\n## Disclaimer\n\nThis component, is build upon a UITextField \"hack, use it at your own risk.\n\n## License\n\nShyView is available under the MIT license. See the [LICENSE](./LICENSE) file for more info.\n\n## Author\n\n[@MarioIannotta](https://twitter.com/marioiannotta), info@marioiannotta.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarioIannotta%2FShyView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMarioIannotta%2FShyView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarioIannotta%2FShyView/lists"}