iOS開源:Magnetic - 可定制地類似 Apple Music 磁力吸引式泡泡選擇器組件
介紹
Magneticis a customizable bubble picker like the Apple Music genre selection.
$ pod try Magnetic
要求
- iOS 9.3+
- Xcode 8.0+
- Swift 3.0+
使用
A Magnetic object is an SKScene .
To display, you present it from an SKView object.
import Magneticclass ViewController: UIViewController {
var skView: SKView { return view as! SKView } override func loadView() { super.loadView() self.view = SKView(frame: self.view.bounds) } override func viewDidLoad() { super.viewDidLoad() let scene = Magnetic(size: self.view.bounds.size) skView.presentScene(scene) }
}</pre>
Add Nodes
func addNode() { let node = Node(title: "Italy", image: UIImage(named: "italy"), color: .red, radius: 30) scene.addChild(node) }Remove Nodes
func removeNode() { node.removeFromParent() }安裝
CocoaPods
To install with CocoaPods , simply add the following line to your Podfile :
use_frameworks! pod "Magnetic"Carthage
To install with Carthage , simply add this in your Cartfile :
github "efremidze/Magnetic"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.
項目主頁:http://www.baiduhome.net/lib/view/home/1490751443724
本文由用戶 ybb9c7032 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!