{"id":15628308,"url":"https://github.com/nsoojin/baraba","last_synced_at":"2025-04-09T14:14:07.638Z","repository":{"id":56903461,"uuid":"240613919","full_name":"nsoojin/baraba","owner":"nsoojin","description":"Make your UIScrollView scroll automatically when user is looking 👀 by tracking face using ARKit and AVFoundation","archived":false,"fork":false,"pushed_at":"2020-03-21T16:44:30.000Z","size":79187,"stargazers_count":317,"open_issues_count":0,"forks_count":27,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-02T12:12:33.840Z","etag":null,"topics":["arkit","auto-scroll","auto-scrolling","avfoundation","face-tracker","ios","ios-auto-scroll","ios-face-detection","ios-library","swift","uicollectionview","uiscrollview","uitableview"],"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/nsoojin.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":"2020-02-14T23:07:40.000Z","updated_at":"2024-11-26T04:24:31.000Z","dependencies_parsed_at":"2022-08-20T18:50:30.909Z","dependency_job_id":null,"html_url":"https://github.com/nsoojin/baraba","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/nsoojin%2Fbaraba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsoojin%2Fbaraba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsoojin%2Fbaraba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsoojin%2Fbaraba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nsoojin","download_url":"https://codeload.github.com/nsoojin/baraba/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054193,"owners_count":21039952,"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":["arkit","auto-scroll","auto-scrolling","avfoundation","face-tracker","ios","ios-auto-scroll","ios-face-detection","ios-library","swift","uicollectionview","uiscrollview","uitableview"],"created_at":"2024-10-03T10:21:51.292Z","updated_at":"2025-04-09T14:14:07.617Z","avatar_url":"https://github.com/nsoojin.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# Baraba\n\u003efrom Korean: \n\u003e\n\u003e*meaning, **Look at me***\n\u003cp\u003e\n   \u003ca href=\"https://github.com/nsoojin/baraba/actions\"\u003e\n      \u003cimg src=\"https://github.com/nsoojin/baraba/workflows/CI/badge.svg\"\u003e\n   \u003c/a\u003e\n   \u003ca href=\"https://developer.apple.com/swift/\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat\" alt=\"Swift 5.0\"\u003e\n   \u003c/a\u003e\n   \u003ca href=\"http://cocoapods.org/pods/Baraba\"\u003e\n      \u003cimg src=\"https://img.shields.io/cocoapods/v/Baraba.svg?style=flat\" alt=\"Version\"\u003e\n   \u003c/a\u003e\n   \u003ca href=\"http://cocoapods.org/pods/Baraba\"\u003e\n      \u003cimg src=\"https://img.shields.io/cocoapods/p/Baraba.svg?style=flat\" alt=\"Platform\"\u003e\n   \u003c/a\u003e\n   \u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat\" alt=\"Carthage Compatible\"\u003e\n   \u003c/a\u003e\n\u003c/p\u003e\n\nMake your UIScrollView scroll automatically when user is looking at the screen 👀\n\n## Features\n\n- [x] Automatic scrolling for your UIScrollView when user is looking at the screen📱👀\n- [x] Pauses scrolling when user turns away📱🙄 or when starts scrolling 👆\n- [x] Face Tracking using ARKit or AVFoundation (Your choice!)\n- [x] Adjust scrolling speed appropriate for your content\n- [x] Complete [Documentation](https://soojin.ro/baraba/)\n- [x] Supports iOS 11 or above\n\n## Demo\n\n### Click below image 👉 YouTube\n\n[![Baraba Demo](etc/baraba_demo.gif)](https://www.youtube.com/watch?v=Hiojxdy_QtM)\n\n## Installation\n\n### CocoaPods\n\nBaraba is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:\n\n```bash\npod 'Baraba'\n```\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate Baraba into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"nsoojin/baraba\"\n```\n\nRun `carthage update` to build the framework and drag the built `Baraba.framework` into your Xcode project. \n\n## Example\n\nThe example application is the best way to see `Baraba` in action. Simply open the `Baraba.xcodeproj` and run the `Example` scheme.\n\n## Basic Usage\n\n### Just three simple lines of code to get it running!\n\n```Swift\n// Probably in your view controller.\nlet baraba = Baraba(configuration: .automatic) // (1) Initialize Baraba\n\noverride func viewDidLoad() {\n    super.viewDidLoad()\n    \n    baraba.scrollView = tableView // (2) Set the scroll view for the auto-scroll target\n    baraba.delegate = self\n}\n\noverride func viewWillAppear(_ animated: Bool) {\n    super.viewWillAppear(animated)\n    \n    baraba.resume() // (3) Resume to activate camera and start tracking user's face\n}\n\noverride func viewWillDisppear(_ animated: Bool) {\n    super.viewWillDisppear(animated)\n    \n    baraba.pause() // Pause to stop accessing camera\n}\n```\n\n## Configuration\n\n```Swift \nlet baraba = Baraba(configuration: .automatic) // Uses ARKit if supported. If not, uses AVFoundation\nlet baraba = Baraba(configuration: .ar)\nlet baraba = Baraba(configuration: .av)\n\nBaraba.isConfigurationSupported(.ar) // Check the device availability\n```\n\n### What's the difference?\n\nARKit uses TrueDepth front camera. Not all iOS devices supports this, so refer to [device compatibility](https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/Cameras/Cameras.html#//apple_ref/doc/uid/TP40013599-CH107-SW1). Generally, ARKit has faster face tracking capability so reacts faster to user movement. However, it consumes more energy and may increase the device temperature when used for a long time. The best way to see the difference is to run it for youself.  Try the Example app.\n\n### Scroll Speed\n\nYou can adjust scroll speed with `preferredScrollSpeed` property, which represents speed in 'points per second'. However, the actual scroll speed will be the nearest multiple of 60. The reason is for smooth scrolling, as the device's maximum refresh rate of the display is 60 frames per second. You can check the actual speed with `actualScrollSpeed` property if you want. Default is 180.\n\n```Swift\nbaraba.preferredScrollSpeed = 240 // baraba.actualScrollSpeed == 240 \nbaraba.preferredScrollSpeed = 100 // baraba.actualScrollSpeed == 120\n```\n\n### Pause Duration\n\nWhen user starts dragging the scroll view, auto-scrolling pauses. After the dragging finishes, auto-scrolling resumes after this duration.\n\n```Swift\nbaraba.pauseDuration = 4\n```\n\n## ⚠️ Important\n\nIf you want to use `BarabaConfiguration.ar`  which uses ARFaceTrackingConfiguration, your app must include a privacy policy describing to users how you intend to use face tracking and face data. (See [Apple's Note](https://developer.apple.com/documentation/arkit/arfacetrackingconfiguration)) \n\n[Example #1](https://soojin.ro/notableme-privacypolicy) (This has passed the actual App Store Review.)\n\nYou can use this [sample](https://github.com/nsoojin/baraba/blob/master/etc/PRIVACY-POLICY-SAMPLE.md) at your own discretion.\n\nDon't forget to add `Privacy - Camera Usage Description` in your app's `info.plist` file.\n\n## FAQ\n\n### What's the origin of the name Baraba?\n\nBaraba(바라봐) is a Korean term which means \"Look at me\".\n\n## Contributing\nContributions are very welcome 🙌\n\n## License\n\nBaraba is released under the MIT license. See [LICENCE](https://github.com/nsoojin/baraba/blob/master/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsoojin%2Fbaraba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnsoojin%2Fbaraba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsoojin%2Fbaraba/lists"}