В примере кода Apple «AVCam», AVCaptureDeviceSubjectAreaDidChangeNotification добавляется в NSNotificationCenter, но его callback «subjectAreaDidChange» никогда не вызывается в моем тесте. Интересно, когда это уведомление будет опубликовано системой?Когда будет опубликован AVCaptureDeviceSubjectAreaDidChangeNotification?
Он добавил следующий код:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(subjectAreaDidChange:)
name:AVCaptureDeviceSubjectAreaDidChangeNotification
object:[[self videoDeviceInput] device]];
И заголовочный файл AVCaptureDevice.h из AVFoundation выглядит следующим образом:
@constant AVCaptureDeviceSubjectAreaDidChangeNotification
@abstract
Posted when the instance of AVCaptureDevice has detected a substantial change to the
video subject area.
@discussion
Clients may observe the AVCaptureDeviceSubjectAreaDidChangeNotification to know when an
instance of AVCaptureDevice has detected a substantial change to the video subject area.
This notification is only sent if you first set subjectAreaChangeMonitoringEnabled to
YES.
Это все мой вопрос. Большое спасибо.