2

单击 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
4

1 回答 1

0

这是ios13.0中的一个错误。在展示VC时,ReplayKit使用UIApplicationRotationFollowingController(modalTransitionStyle = pageSheet)来展示一个RPBroadcastPickerStandaloneViewController(modalTransitionStyle = curl)。但是 curl 仅在之前的 vc 为 fullScreen 时可用。所以解决的办法就是钩上presentApi,改变样式。

于 2020-06-12T10:31:59.100 回答