iOS Developer Library

Developer

MediaPlayer Framework Reference MPRatingCommand Class Reference

Options
Deployment Target:

On This Page
Language:

MPRatingCommand

Inheritance


Conforms To


Import Statement


Swift

import MediaPlayer

Objective-C

@import MediaPlayer;

Availability


Available in iOS 7.1 and later.

The MPRatingCommand class provides additional information for the rating commands described in MPRemoteCommandCenter class. Apps can define a maximum and minimum rating for a media item.

  • The maximum rating for a command.

    Declaration

    Swift

    var maximumRating: Float

    Objective-C

    @property(nonatomic, assign) float maximumRating

    Discussion

    The maximumRating property must be greater than the minimumRating property.

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 7.1 and later.

  • The minimum rating for a command.

    Declaration

    Swift

    var minimumRating: Float

    Objective-C

    @property(nonatomic, assign) float minimumRating

    Discussion

    The minimumRating property must be less than the maximumRating property.

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 7.1 and later.