efremidze / Magnetic
Licence: mit
SpriteKit Floating Bubble Picker (inspired by Apple Music) 🧲
Stars: ✭ 1,252
Programming Languages
swift
15916 projects
Projects that are alternatives of or similar to Magnetic
React Native Bubble Select
An easy-to-use customizable bubble animation picker, similar to the Apple Music genre selection
Stars: ✭ 78 (-93.77%)
Mutual labels: apple, music, picker, bubble
Cluster
Easy Map Annotation Clustering 📍
Stars: ✭ 1,132 (-9.58%)
Mutual labels: apple, cocoapods, carthage
Haptica
Easy Haptic Feedback Generator 📳
Stars: ✭ 587 (-53.12%)
Mutual labels: apple, cocoapods, carthage
Shiny
Iridescent Effect View (inspired by Apple Pay Cash) ✨
Stars: ✭ 707 (-43.53%)
Mutual labels: apple, cocoapods, carthage
Shsearchbar
The search bar that doesn't suck.
Stars: ✭ 206 (-83.55%)
Mutual labels: apple, cocoapods, carthage
Statusalert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.
Stars: ✭ 809 (-35.38%)
Mutual labels: apple, cocoapods, carthage
Avsqldebugger
A Simple Core Data Debugger that will look inside your apps DB
Stars: ✭ 30 (-97.6%)
Mutual labels: apple, cocoapods, carthage
Unboxedalamofire
[Deprecated] Alamofire + Unbox: the easiest way to download and decode JSON into swift objects.
Stars: ✭ 65 (-94.81%)
Mutual labels: cocoapods, carthage
Silentscrolly
Scroll to hide navigationBar, tabBar and toolBar.
Stars: ✭ 79 (-93.69%)
Mutual labels: cocoapods, carthage
Soundable
Soundable allows you to play sounds, single and in sequence, in a very easy way
Stars: ✭ 78 (-93.77%)
Mutual labels: cocoapods, carthage
Cameramanager
Simple Swift class to provide all the configurations you need to create custom camera view in your app
Stars: ✭ 1,130 (-9.74%)
Mutual labels: cocoapods, carthage
Memorycache
LRU, type-safe, thread-safe memory cache class in Swift
Stars: ✭ 66 (-94.73%)
Mutual labels: cocoapods, carthage
Transitionbutton
UIButton sublass for loading and transition animation.
Stars: ✭ 1,124 (-10.22%)
Mutual labels: cocoapods, carthage
Corenavigation
📱📲 Navigate between view controllers with ease. 💫 🔜 More stable version (written in Swift 5) coming soon.
Stars: ✭ 69 (-94.49%)
Mutual labels: cocoapods, carthage
Css3colorsswift
A UIColor extension with CSS3 Color names.
Stars: ✭ 62 (-95.05%)
Mutual labels: cocoapods, carthage
Popmenu
A fully customizable popup style menu for iOS 😎
Stars: ✭ 1,155 (-7.75%)
Mutual labels: cocoapods, carthage
Sheeeeeeeeet
Sheeeeeeeeet is a Swift library for creating menus, custom action sheets, context menus etc.
Stars: ✭ 1,177 (-5.99%)
Mutual labels: cocoapods, carthage
Notificationz
📡 Helping you own NotificationCenter in Swift!
Stars: ✭ 74 (-94.09%)
Mutual labels: cocoapods, carthage
Magnetic
Magnetic is a customizable bubble picker like the Apple Music genre selection.
$ pod try Magnetic
Features
- [x] Adding/Removing Nodes
- [x] Selection/Deselection/Removed Animations
- [x] Multiple Selection
- [x] Images
- [x] Multiline Label
- [x] Documentation
Requirements
- iOS 9.0+
- Xcode 9.0+
- Swift 5 (Magnetic 3.x), Swift 4 (Magnetic 2.x), Swift 3 (Magnetic 1.x)
Usage
A Magnetic
object is an SKScene.
To display, you present it from an SKView object.
import Magnetic
class ViewController: UIViewController {
var magnetic: Magnetic?
override func loadView() {
super.loadView()
let magneticView = MagneticView(frame: self.view.bounds)
magnetic = magneticView.magnetic
self.view.addSubview(magneticView)
}
}
Properties
var magneticDelegate: MagneticDelegate? // magnetic delegate
var allowsMultipleSelection: Bool // controls whether you can select multiple nodes. defaults to true
var selectedChildren: [Node] // returns selected chidren
Nodes
A Node
object is a SKShapeNode subclass.
Interaction
// add circular node
let node = Node(text: "Italy", image: UIImage(named: "italy"), color: .red, radius: 30)
magnetic.addChild(node)
// add custom node
let node = Node(text: "France", image: UIImage(named: "france"), color: .blue, path: path, marginScale: 1.1)
magnetic.addChild(node)
// remove node
node.removeFromParent()
Properties
var text: String? // node text
var image: UIImage? // node image
var color: UIColor // node color
Animations
override func selectedAnimation() {
// override selected animation
}
override func deselectedAnimation() {
// override deselected animation
}
override func removedAnimation(completion: @escaping () -> Void) {
// override removed animation
}
Delegation
The MagneticDelegate
protocol provides a number of functions for observing the current state of nodes.
func magnetic(_ magnetic: Magnetic, didSelect node: Node) {
// handle node selection
}
func magnetic(_ magnetic: Magnetic, didDeselect node: Node) {
// handle node deselection
}
Customization
Subclass the Node for customization.
For example, a node with an image by default:
class ImageNode: Node {
override var image: UIImage? {
didSet {
texture = image.map { SKTexture(image: $0) }
}
}
override func selectedAnimation() {}
override func deselectedAnimation() {}
}
Installation
CocoaPods
To install with CocoaPods, simply add this in your Podfile
:
use_frameworks!
pod "Magnetic"
Carthage
To install with Carthage, simply add this in your Cartfile
:
github "efremidze/Magnetic"
Mentions
Communication
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, submit a pull request.
Credits
https://github.com/igalata/Bubble-Picker
License
Magnetic is available under the MIT license. See the LICENSE file for more info.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].