Playlist Generator
1.0
|
#import <SpotifyPlayer.h>
Public Member Functions | |
(void) | - setArray: |
Called in the previous view controller, this method fills the array with tracks to be played. | |
(void) | - loginToSpotifyWithUsername:andPassword: |
This method creates a SPSpotify session to connect to the Spotify API. | |
(void) | - playTrackAtIndex: |
This method causes the track at index to be loaded and played. | |
(void) | - getCoverImageForTrack: |
This method causes the track object to load its album cover as an SPImage. | |
(void) | - timerFireMethod: |
This method is called automatically when any NSTimer fires. | |
(void) | - initAudioSession |
(IBAction) | - togglePlayPause: |
(IBAction) | - nextTrack: |
(IBAction) | - previousTrack: |
(IBAction) | - movedSlider: |
(IBAction) | - showActionSheet: |
Protected Attributes | |
IBOutlet UIBarButtonItem * | playPauseButton |
IBOutlet UILabel * | trackLabel |
IBOutlet UILabel * | artistLabel |
IBOutlet UIImageView * | coverImageView |
IBOutlet UISlider * | progressMeter |
IBOutlet UIToolbar * | bottomToolbar |
MBProgressHUD * | hud |
MPNowPlayingInfoCenter * | nowPlaying |
NSMutableDictionary * | nowPlayingInfo |
NSArray * | trackURIs |
int | currentTrackPlayingIndex |
SPPlaybackManager * | manager |
NSTimeInterval | currentTrackDuration |
NSTimer * | timer |
This view controller contains all of the UI elements for loading and playing music using the Spotify API.
- (void) getCoverImageForTrack: | (SPTrack *) | track |
This method causes the track object to load its album cover as an SPImage.
track | An SPTrack object |
- (void) initAudioSession |
This method creates a SPSpotify session to connect to the Spotify API.
username | A valid Spotify Premium username |
password | A valid Spotify Premium password |
- (IBAction) movedSlider: | (id) | sender |
- (IBAction) nextTrack: | (id) | sender |
- (void) playTrackAtIndex: | (NSNumber *) | index |
This method causes the track at index to be loaded and played.
index | The index of trackURIs to be played |
- (IBAction) previousTrack: | (id) | sender |
- (void) setArray: | (NSArray *) | theArray |
Called in the previous view controller, this method fills the array with tracks to be played.
theArray | The array of tracks to be played. |
- (void) showActionSheet: | (id) | sender |
- (void) timerFireMethod: | (NSTimer*) | theTimer |
This method is called automatically when any NSTimer fires.
theTimer | The NSTimer object that fired |
- (IBAction) togglePlayPause: | (id) | sender |
- (IBOutlet UILabel*) artistLabel [protected] |
- (IBOutlet UIToolbar*) bottomToolbar [protected] |
- (IBOutlet UIImageView*) coverImageView [protected] |
- (NSTimeInterval) currentTrackDuration [protected] |
- (int) currentTrackPlayingIndex [protected] |
- (MBProgressHUD*) hud [protected] |
- (SPPlaybackManager*) manager [protected] |
- (MPNowPlayingInfoCenter*) nowPlaying [protected] |
- (NSMutableDictionary*) nowPlayingInfo [protected] |
- (IBOutlet UIBarButtonItem*) playPauseButton [protected] |
- (IBOutlet UISlider*) progressMeter [protected] |
- (NSTimer*) timer [protected] |
- (IBOutlet UILabel*) trackLabel [protected] |
- (NSArray*) trackURIs [protected] |