Finally, in iOS7 you are able to able to know if a remote device is available via AirPlay, Bluetooth, or some other wireless mechanism. This allows your app to behave appropriately, such as hiding an AirPlay icon when that service isn’t available on other devices.
The following two new properties and notifications have been added to
MPVolumeView
:@property (nonatomic, readonly) BOOL wirelessRoutesAvailable; // is there a route that the device can connect to? @property (nonatomic, readonly) BOOL wirelessRouteActive; // is the device currently connected? NSString *const MPVolumeViewWirelessRoutesAvailableDidChangeNotification; NSString *const MPVolumeViewWirelessRouteActiveDidChangeNotification; |
The MPVolumeViewWirelessRoutesAvailableDidChangeNotification notification allow us to know when the availability of AirPlay routes has changed. The MPVolumeViewWirelessRouteActiveDidChangeNotification notification allow the user to know when the user has changed the route currently in use.
Cap comentari:
Publica un comentari a l'entrada