iOS开源:Magnetic - 可定制地类似 Apple Music 磁力吸引式泡泡选择器组件

ybb9c7032 8年前
   <h2>介绍</h2>    <p>Magneticis a customizable bubble picker like the Apple Music genre selection.</p>    <p><img src="https://simg.open-open.com/show/6016f162535eec47af7511b0c0c74c65.gif"></p>    <pre>  $ pod try Magnetic</pre>    <h2>要求</h2>    <ul>     <li>iOS 9.3+</li>     <li>Xcode 8.0+</li>     <li>Swift 3.0+</li>    </ul>    <h2>使用</h2>    <p>A Magnetic object is an <a href="/misc/goto?guid=4959746271526656708" rel="nofollow,noindex">SKScene</a> .</p>    <p>To display, you present it from an <a href="/misc/goto?guid=4959746271613415053" rel="nofollow,noindex">SKView</a> object.</p>    <pre>  import Magnetic    class 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>    <p>Add Nodes</p>    <pre>  func addNode() {      let node = Node(title: "Italy", image: UIImage(named: "italy"), color: .red, radius: 30)      scene.addChild(node)  }</pre>    <p>Remove Nodes</p>    <pre>  func removeNode() {      node.removeFromParent()  }</pre>    <h2>安装</h2>    <h3>CocoaPods</h3>    <p>To install with <a href="/misc/goto?guid=4958539574664641318" rel="nofollow,noindex">CocoaPods</a> , simply add the following line to your Podfile :</p>    <pre>  use_frameworks!  pod "Magnetic"</pre>    <h3>Carthage</h3>    <p>To install with <a href="/misc/goto?guid=4958877729065386929" rel="nofollow,noindex">Carthage</a> , simply add this in your Cartfile :</p>    <pre>  github "efremidze/Magnetic"</pre>    <h2>Communication</h2>    <ul>     <li>If you <strong>found a bug</strong> , open an issue.</li>     <li>If you <strong>have a feature request</strong> , open an issue.</li>     <li>If you <strong>want to contribute</strong> , submit a pull request.</li>    </ul>    <h2>Credits</h2>    <p><a href="/misc/goto?guid=4959745967035430063" rel="nofollow,noindex">https://github.com/igalata/Bubble-Picker</a></p>    <h2>License</h2>    <p>Magnetic is available under the MIT license. See the LICENSE file for more info.</p>    <p> </p>    <p>项目主页:<a href="http://www.open-open.com/lib/view/home/1490751443724">http://www.open-open.com/lib/view/home/1490751443724</a></p>    <p> </p>    <p> </p>