在 Protocol中,我看到了两种非常相似的方法:
/**
* Called when the connection to the device has been terminated. It is safe to release the
* GCKDeviceManager object from within this callback.
*
* @param deviceManager The device manager.
* @param error The error that caused the disconnection; nil if there was no error (e.g. intentional
* disconnection).
*/
- (void)deviceManager:(GCKDeviceManager *)deviceManager
didDisconnectWithError:(NSError *)error;和
/**
* Called when disconnected from the current application.
*
* @param deviceManager The device manager.
* @param error The error that caused the disconnect, or <code>nil</code> if this was a normal
* disconnect.
*/
- (void)deviceManager:(GCKDeviceManager *)deviceManager
didDisconnectFromApplicationWithError:(NSError *)error;如果Chromecast接收器断开或失去与应用程序的连接,是否调用deviceManager:didDisconnectWithError:?当应用程序试图断开与Chromecast接收器的连接时,deviceManager:didDisconnectFromApplicationWithError:是否调用?
当每个委托方法被调用时,用例是什么?
发布于 2016-03-04 15:58:12
发送方应用程序可以连接到转换设备,并且在成功连接时,可以在转换设备上启动接收方应用程序。因此,“连接到设备”和“运行应用程序”是两个不同的操作,“停止接收应用程序”和“断开”转换设备也是如此。因此,有这两种不同的方法。
https://stackoverflow.com/questions/35800293
复制相似问题