iOS 音樂播放視圖:InteractivePlayerView

jopen 9年前發布 | 9K 次閱讀 iOS開發 移動開發 InteractivePlayerView

InteractivePlayerView 是可以自定義的 iOS 音樂播放視圖,一個IBDesignableView (自定義View) ,它擁有自己的進度條,封面和動作按紐。

iOS 音樂播放視圖:InteractivePlayerView

用法

  • Add your view in storyboard
  • Arrange your view's size square (It looks better this way)
  • Set your view's class InteractivePlayerView
  • Wait until it built in storyboard and set variables
  • Then create your property of view and set it's delegate to self to use it's delegation methods and good to go !

@IBOutlet var ipv: InteractivePlayerView!

  // set delegation
  self.ipv!.delegate = self

  // duration of music
  self.ipv.progress = 120.0

  // start - stop player
  self.ipv.start()  self.ipv.stop()  /* InteractivePlayerViewDelegate METHODS */
    func actionOneButtonTapped(sender: UIButton, isSelected: Bool) {
        println("ActionOneButton tapped")
    }    func actionTwoButtonTapped(sender: UIButton, isSelected: Bool) {
        println("ActionTwoButton tapped")
    }    func actionThreeButtonTapped(sender: UIButton, isSelected: Bool) {
        println("ActionThreeButton tapped")

    }

項目主頁:http://www.baiduhome.net/lib/view/home/1444979456450

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!