DislikeButton Class Reference

Inherits from UIButton
Declared in DislikeButton.h

Overview

Button that automatically changes its enabled and selected properties based on the state of the music player, and sends dislike and unlike requests to the music player when tapped.

To properly render a ‘dislike’ button, the following images should be assigned to the following states:

  • when enabled = false, the button should render as disabled
  • when enabled = true and selected = true, the button should render to indicate the user dislikes the current song
  • when enabled = true and selected = false, the button should render to indicate the user has not disliked the current song

When a user taps on the button while it is enabled and selected, the button will call [AdaptrAudioPlayer unlike]. When a user taps on the button while it is enabled and not selected, the button will call [AdaptrAudioPlayer dislike].

The button will listen for state change events from the AdaptrAudioPlayer and update its state accordingly.

If the audioItem property is assigned, then the state of the button reflects the ‘like’ or ‘dislike’ status of the specified song, rather than the currently playing song.

  audioItem

If set, then the button reflects the like/dislike state of the specified song.

@property (nonatomic, strong) Audiofile *audioItem

Declared In

DislikeButton.h