{"id":19252220,"url":"https://github.com/bellapplab/blbubblefilters","last_synced_at":"2025-04-21T13:30:44.320Z","repository":{"id":56902978,"uuid":"64211135","full_name":"BellAppLab/BLBubbleFilters","owner":"BellAppLab","description":"BLBubbleFilters gives you bubble filters à la Apple Music.","archived":false,"fork":false,"pushed_at":"2018-10-21T12:35:22.000Z","size":1252,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T20:49:11.254Z","etag":null,"topics":["apple-music","bubbles","carthage","cocoapods","ios","objective-c","spritekit","tvos"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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":"2016-07-26T10:04:13.000Z","updated_at":"2024-09-03T16:08:50.000Z","dependencies_parsed_at":"2022-08-21T01:50:45.673Z","dependency_job_id":null,"html_url":"https://github.com/BellAppLab/BLBubbleFilters","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BellAppLab%2FBLBubbleFilters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BellAppLab%2FBLBubbleFilters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BellAppLab%2FBLBubbleFilters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BellAppLab%2FBLBubbleFilters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BellAppLab","download_url":"https://codeload.github.com/BellAppLab/BLBubbleFilters/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250064526,"owners_count":21368922,"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":["apple-music","bubbles","carthage","cocoapods","ios","objective-c","spritekit","tvos"],"created_at":"2024-11-09T18:26:00.973Z","updated_at":"2025-04-21T13:30:43.554Z","avatar_url":"https://github.com/BellAppLab.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BLBubbleFilters [![Version](https://img.shields.io/badge/Version-1.0.1-black.svg?style=flat)](#installation) [![License](https://img.shields.io/cocoapods/l/BLBubbleFilters.svg?style=flat)](#license)\n\n[![Platforms](https://img.shields.io/badge/Platforms-iOS|tvOS-brightgreen.svg?style=flat)](#installation)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/BLBubbleFilters.svg?style=flat\u0026label=CocoaPods)](https://cocoapods.org/pods/BLBubbleFilters)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Twitter](https://img.shields.io/badge/Twitter-@BellAppLab-blue.svg?style=flat)](http://twitter.com/BellAppLab)\n\n![BLBubbleFilters](./Images/bubble_filters.png)\n\n![BLBubbleFilters](./Images/bubble_filters.gif)\n\nBLBubbleFilters gives you bubble filters à la Apple Music.\n\nInspired by: [SIFloatingCollection_Swift](https://github.com/ProudOfZiggy/SIFloatingCollection_Swift)\n\n## Specs\n\n* SpriteKit\n* iOS 9+\n* tvOS 9+\n\n## Usage\n\nThe starting point of using `BLBubbleFilters` is the `BLBubbleScene` class. We begin by initialising one:\n\n```objc\n- (void)viewWillAppear:(BOOL)animated\n{\n    [super viewWillAppear:animated];\n    \n    BLBubbleScene *scene = [BLBubbleScene sceneWithSize:CGSizeMake(self.view.bounds.size.width / 2.0, self.view.bounds.size.height / 2.0)];\n    scene.backgroundColor = [UIColor whiteColor];\n    scene.bubbleDataSource = \u003c#code#\u003e;\n    scene.bubbleDelegate = \u003c#code#\u003e;\n\n    [(SKView *)self.view presentScene:scene];\n}\n```\n\n**Notes**:\n1. We highly recommend initialising a `BLBubbleScene` on `viewWillAppear:` so it gets correctly adjusted to the screen size.\n2. The example above assumes your view controller's `view` is a `SKView`.\n\n### Scene data source\n\nYou must provide the `BLBubbleScene` with a data source conforming to the `BLBubbleSceneDataSource` protocol. Its two required methods are:\n\n```objc\n//provides the scene with the number of bubbles to present\n- (NSInteger)numberOfBubblesInBubbleScene:(BLBubbleScene *)scene {\n    return \u003c#code#\u003e;\n}\n```\n\nAnd:\n\n```objc\n- (id\u003cBLBubbleModel\u003e)bubbleScene:(BLBubbleScene *)scene\n           modelForBubbleAtIndex:(NSInteger)index\n{\n    return \u003c#code#\u003e;\n}\n```\n\nThe `BLBubbleModel` protocol provides a bubble with some of the visual information it needs to draw itself.\n\n### Scene delegate\n\nYou may set the scene's `delegate`, if you'd like to be notified when a bubble is selected:\n\n```objc\n- (void)bubbleScene:(BLBubbleScene *)scene\n    didSelectBubble:(BLBubbleNode *)bubble\n            atIndex:(NSInteger)index\n{\n    //a bubble has been tapped\n}\n```\n\n## Example\n\nA typical implementation of `BLBubbleFilters` looks like this:\n\n```objc\n#import \"ViewController.h\"\n#import \u003cBLBubbleFilters/BLBubbleFilters.h\u003e\n#import \"Bubble.h\"\n\n\n@interface ViewController () \u003cBLBubbleSceneDataSource, BLBubbleSceneDelegate\u003e\n\n@property (nonatomic, strong) NSArray\u003cBubble *\u003e *bubbles;\n\n@end\n\n\n@implementation ViewController\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    \n    [self setBubbles:@[[[Bubble alloc] initWithIndex:0],\n                       [[Bubble alloc] initWithIndex:1],\n                       [[Bubble alloc] initWithIndex:2],\n                       [[Bubble alloc] initWithIndex:3]]];\n}\n\n- (void)viewWillAppear:(BOOL)animated\n{\n    [super viewWillAppear:animated];\n    \n    BLBubbleScene *scene = [BLBubbleScene sceneWithSize:self.view.bounds.size];\n    scene.backgroundColor = [UIColor whiteColor];\n    scene.bubbleDataSource = self;\n    scene.bubbleDelegate = self;\n\n    [(SKView *)self.view presentScene:scene];\n}\n\n#pragma mark Bubble Delegate\n\n- (void)bubbleScene:(BLBubbleScene *)scene\n    didSelectBubble:(BLBubbleNode *)bubble\n            atIndex:(NSInteger)index\n{\n    NSLog(@\"Bubble Pressed! %@\", bubble);\n    NSLog(@\"The bubble is now on state %ld\", (long)[bubble.model bubbleState]);\n}\n\n#pragma mark Bubble Data Source\n\n- (NSInteger)numberOfBubblesInBubbleScene:(BLBubbleScene *)scene\n{\n    return self.bubbles.count;\n}\n\n- (id\u003cBLBubbleModel\u003e)bubbleScene:(BLBubbleScene *)scene\n           modelForBubbleAtIndex:(NSInteger)index\n{\n    return [self.bubbles objectAtIndex:index];\n}\n\n@end\n\n```\n\n_**Note**: Implementation of the `Bubble` Data Model is up to you. ;)_\n\n## Requirements\n\n* iOS 8+\n* Obj-C\n* SpriteKit\n\n## Installation\n\n### Cocoapods\n\n```ruby\npod 'BLBubbleFilters', '~\u003e 1.0'\n```\n\nThen `#import \u003cBLBubbleFilters/BLBubbleFilters.h\u003e` where needed.\n\n### Carthage\n\n```objc\ngithub \"BellAppLab/BLBubbleFilters\" ~\u003e 1.0\n```\n\nThen `#import \u003cBLBubbleFilters/BLBubbleFilters.h\u003e` where needed.\n\n### Git Submodules\n\n```shell\ncd toYourProjectsFolder\ngit submodule add -b submodule --name BLBubbleFilters https://github.com/BellAppLab/BLBubbleFilters.git\n```\n\nThen drag the `BLBubbleFilters` folder into your Xcode project.\n\n## Author\n\nBell App Lab, apps@bellapplab.com\n\n### Credits\n\n[Logo image](https://thenounproject.com/search/?q=bubble\u0026i=1118287#) by [Jaohuarye](https://thenounproject.com/jaohuarye) from [The Noun Project](https://thenounproject.com/)\n\n## License\n\nBLBubbleFilters 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%2Fbellapplab%2Fblbubblefilters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbellapplab%2Fblbubblefilters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbellapplab%2Fblbubblefilters/lists"}