{"id":2199,"url":"https://github.com/GlebRadchenko/AmazingBubbles","last_synced_at":"2025-08-02T23:32:31.706Z","repository":{"id":56901917,"uuid":"86836804","full_name":"GlebRadchenko/AmazingBubbles","owner":"GlebRadchenko","description":"Bubble pickers, inspired by Apple","archived":false,"fork":false,"pushed_at":"2017-09-01T19:33:18.000Z","size":78040,"stargazers_count":64,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-29T15:03:59.253Z","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/GlebRadchenko.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":"2017-03-31T15:59:45.000Z","updated_at":"2024-09-03T16:27:29.000Z","dependencies_parsed_at":"2022-08-21T02:50:49.614Z","dependency_job_id":null,"html_url":"https://github.com/GlebRadchenko/AmazingBubbles","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/GlebRadchenko%2FAmazingBubbles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlebRadchenko%2FAmazingBubbles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlebRadchenko%2FAmazingBubbles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlebRadchenko%2FAmazingBubbles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GlebRadchenko","download_url":"https://codeload.github.com/GlebRadchenko/AmazingBubbles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503145,"owners_count":17930520,"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-01-05T20:16:07.387Z","updated_at":"2024-12-06T17:30:52.163Z","avatar_url":"https://github.com/GlebRadchenko.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Other free courses","Font","Other Testing"],"readme":"# AmazingBubbles\nBubble pickers, inspired by Apple\n\n![](https://github.com/GlebRadchenko/AmazingBubbles/blob/master/Resources/example.gif)\n\n## Requirements: \n  - iOS 9.1+\n  - XCode 8.0+ \n  - Swift 3.0\n  \n## Installation\nAmazingBubbles Library is available through [CocoPods](https://cocoapods.org). To install, add the following line to your Podfile: \n\n  ``` ruby\n  pod 'AmazingBubbles', '~\u003e 0.0'\n```\n\n## Usage: \n\n 1. Import library as follows: \n \n  ``` swift\n  import AmazingBubbles\n```\n\n 2. Add ContentBubblesView to your VC;\n 3. Add delegate and dataSource for ContentBubblesView instance:\n \n  ``` swift\nclass ViewController: UIViewController {\n\n    @IBOutlet weak var bubblesView: ContentBubblesView! {\n        didSet {\n            bubblesView.delegate = self\n            bubblesView.dataSource = self\n        }\n    }\n    \n}\n```\n\n 4. Implement protocols :\n``` swift\npublic protocol ContentBubblesViewDelegate: class {\n    func minimalSizeForBubble(in view: ContentBubblesView) -\u003e CGSize\n    func maximumSizeForBubble(in view: ContentBubblesView) -\u003e CGSize\n    \n    func contentBubblesView(_ view: ContentBubblesView, didSelectItemAt index: Int)\n    func contentBubblesView(_ view: ContentBubblesView, shouldChangeSizeForItemAt index: Int) -\u003e Bool\n    func contentBubblesView(_ view: ContentBubblesView, didChangeSizeForItemAt index: Int)\n}\n\npublic protocol ContentBubblesViewDataSource: class {\n    func countOfSizes(in view: ContentBubblesView) -\u003e Int\n    \n    func numberOfItems(in view: ContentBubblesView) -\u003e Int\n    func addOrUpdateBubbleView(forItemAt index: Int, currentView: BubbleView?) -\u003e BubbleView\n}\n```\nfor example: \n``` swift\nextension ViewController: ContentBubblesViewDataSource {\n    func countOfSizes(in view: ContentBubblesView) -\u003e Int {\n        return 3\n    }\n    \n    func numberOfItems(in view: ContentBubblesView) -\u003e Int {\n        return 15\n    }\n    \n    func addOrUpdateBubbleView(forItemAt index: Int, currentView: BubbleView?) -\u003e BubbleView {\n        var view: BubbleView = currentView ?? BubbleView()        \n        view.backgroundColor = .clear\n        let randomOrigin = CGPoint(x: CGFloat(drand48() * Double(self.view.frame.width * 2 / 3)),\n                                   y: CGFloat(drand48() * Double(self.view.frame.height * 2 / 3)))\n        view.frame = CGRect(origin: randomOrigin,\n                            size: .zero)\n        return view\n    }\n}\n ```\n 5. And than call:\n \n ``` swift\n bubblesView.reload(randomizePosition: true) \n ```\n \n ## Additional features: \n - You can create custom views by subclassing BubbleView\n - You can enable/disable gestures in ContentBubblesView:\n ``` swift\n bubblesView.tapEnabled = true\n bubblesView.panEnabled = false\n ```\n - Also you can change some settings in BubbleConstants struct or play with some settings of UIDynamicBehaviors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGlebRadchenko%2FAmazingBubbles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGlebRadchenko%2FAmazingBubbles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGlebRadchenko%2FAmazingBubbles/lists"}