Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
MPUTransportControl - iPhone Development Wiki

MPUTransportControl

From iPhone Development Wiki
Revision as of 01:42, 24 December 2016 by Andrewwiik (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

MPUTransportControl is a class which is used when displaying a MPUControlCenterTransportButton

MPUTransportControl *transportControl = [[NSClassFromString(@"MPUTransportControl") alloc] initWithType:9 group:3];

Creating a MPUtransportControl requires knowing the type of button you want and the group where you want it displayed, tested on iOS 9 and 10

// Type's

// 0 none
// 1 Rewind
// 2 15 sec rewind
// 3 Play
// 4 Forward
// 5 15 sec forward
// 6 Hamburger menu - does nothing
// 7 Show up next - no image - does nothing
// 8 Share button - has image does nothing
// 9 Repeat - No Image but works - manually set image if desired
// 10 Shuffl - No Image but works - manually set image if desired
// 11 Contextual Menu - No Image - Haven't tested
// 12 Playback rate - No Image - Haven't tested
// 13 sleep timer - No image - Haven't tested
// 14 Add to library - No image - Haven't tested

// Group
// 1 Left
// 2 Middle
// 3 Right