Yes, this compiles - with small changes - and looks much better.
AVCaptureStillImageOutput = interface(iOSapi.AVFoundation.AVCaptureStillImageOutput)
['{A1669519-9901-489E-BDD1-A0E697C8C6CB}']
procedure addObserver(observer: Pointer; forKeyPath: NSString; options: NSKeyValueObservingOptions; context: Pointer); cdecl;
procedure captureStillImageAsynchronouslyFromConnection(connection: AVCaptureConnection; completionHandler: TAVCaptureCompletionHandler); cdecl;
end;
TAVCaptureStillImageOutput = class(TOCGenericImport<AVCaptureStillImageOutputClass, AVCaptureStillImageOutput>)
end;
// objc_msgSendP4((FStillImageOutput as ILocalObject).GetObjectID,
// sel_getUid('addObserver:forKeyPath:options:context:'),
// FVideoCaptureDelegate.GetObjectID,
// (StrToNSStr('capturingStillImage') as ILocalObject).GetObjectID,
// NSKeyValueObservingOptionNew,
// (FAVCaptureStillImageIsCapturingStillImageContext as ILocalObject).GetObjectID);
TAVCaptureStillImageOutput.Wrap(FStillImageOutput).addObserver(
FVideoCaptureDelegate.GetObjectID,
StrToNSStr('capturingStillImage'),
NSKeyValueObservingOptionNew,
NSObjectToID(FAVCaptureStillImageIsCapturingStillImageContext));
{
[stillImageOutput
addObserver:self
forKeyPath:@"capturingStillImage"
options:NSKeyValueObservingOptionNew
context:AVCaptureStillImageIsCapturingStillImageContext];
}
Source Link.