Sliding Music Player iOS

* * * * (17 ratings)
Sliding Music Player | App Code for Sale | Hero

Screenshots

Overview

“Sliding Music Player“ is a custom control that is easy to integrate in every project. It allows you to play music files that are stored both locallly or on a server.

“Sliding Music Player“ is easy to customize, data is stored in property list (XML file). All included images have retina (HD) support. Control have animated image when music is playing.

The package contains:

  • source code

  • complete documentation

  • retina images

“Sliding Music Player“ can easily be added to your project with few lines of code, all you need to do is to allocate SlidingMusicPlayerView with and add it to your view.

UPDATE 25th May 2012 Remote streaming Audio Bug solved

How To

Create new project or open existing one and add following files to project (from Source folder):

  • SlidingMusicPlayerView.h

  • SlidingMusicPlayerView.m

  • playlist.plist

Add all images from Assets folder to your project. Control requires following frameworks, please include them to your project:

  • CoreMedia.framework

  • AVFoundation.framework

  • QuartzCore.framework

“Sliding Music Player“ can easily be added to your project with few lines of code, all you need to do is to allocate SlidingMusicPlayerView with and add it to your view.

// Allocate control, define it's frame to be 320.0f, 50.0f
SlidingMusicPlayerView *SMPlayer = [[SlidingMusicPlayerView alloc] initWithFrame:CGRectMake(100.0f, 50.0f, 320.0f, 50.0f)];
// Add control to view
[self.view addSubview:SMPlayer];
// Release control
[SMPlayer release];

Don't forget to include control in your header file:

#import " SlidingMusicPlayerView.h";

You can edit playlist by opening playlist.plist file. Each item is defined with:

  • Title: name of song that will be displayed on player control
  • Type: “local“ or “remote“ file (local means included in project, remote is file that is played from internet)
  • Path: name of local file or URL address
  • Extension: file extension
19 Comments Leave a comment