单击RPSystemBroadcastPickerView的子视图按钮时,可能会出现一个控制器。但t给出了一个例外,描述如下:
致命异常: NSInvalidArgumentException应用程序尝试以模态方式呈现活动控制器
Crashlytics日志:-
1 libobjc.A.dylib 0x1acb54c1c objc_exception_throw
2 UIKitCore 0x1b092fb20 -[UIViewController _presentViewController:withAnimationController:completion:]
3 UIKitCore 0x1b0931e00 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke
4 UIKitCore 0x1b0932354 -[UIViewController _performCoordinatedPresentOrDismiss:animated:]
5 UIKitCore 0x1b0931d4c -[UIViewController _presentViewController:animated:completion:]
6 UIKitCore 0x1b0931fe0 -[UIViewController presentViewController:animated:completion:]
7 ReplayKit 0x1d7cab6f8 -[RPModalPresentationWindow presentViewController:animated:completion:]
8 ReplayKit 0x1d7c9ba98 -[RPBroadcastPickerStandaloneViewController presentAnimated:completion:]
9 ReplayKit 0x1d7c9c54c __45-[RPSystemBroadcastPickerView buttonPressed:]_block_invoke
10 ReplayKit 0x1d7c9b8d4 __120-[RPBroadcastPickerStandaloneViewController loadViewControllerWithBundleIdentifier:showMicrophoneButton:withCompletion:]_block_invoke_2
11 libdispatch.dylib 0x1acadeec4 _dispatch_call_block_and_release
12 libdispatch.dylib 0x1acae033c _dispatch_client_callout
13 libdispatch.dylib 0x1acaec600 _dispatch_main_queue_callback_4CF
14 CoreFoundation 0x1acdbb41c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
15 CoreFoundation 0x1acdb6034 __CFRunLoopRun
16 CoreFoundation 0x1acdb5660 CFRunLoopRunSpecific
17 GraphicsServices 0x1b71c6604 GSEventRunModal
18 UIKitCore 0x1b0f8a15c UIApplicationMain
19 ScreenRecorder 0x10055d068 main + 30 (AppDelegate.swift:30)
20 libdyld.dylib 0x1acc311ec start发布于 2020-06-12 18:31:59
这是ios13.0中的一个错误。而presentingVC,ReplayKit使用RPBroadcastPickerStandaloneViewController(modalTransitionStyle = curl)来表示presentingVC=curl)。但curl只有在之前的vc为fullScreen时才可用。因此,解决方案是挂接presentApi并更改样式。
https://stackoverflow.com/questions/61776178
复制相似问题