共享文字iPhone和iPad

我需要在iPhone和iPad上共享文本,我的代码适用于iPhone,但不适用于iPad。

我正在使用静态函数从tableView的TrailingSwipeActionsConfigurationForRowAt选项调用

static func dialogCompartir(titulo: String, descripcion: String, view: UIViewController, url: String) -> Void {
    // Set the link to share.
    if let link = NSURL(string: url) {
        let objectsToShare = [descripcion,link] as [Any]
        let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)

        if UIDevice.current.userInterfaceIdiom == .pad {
            print("ipad")
            view.present(activityVC, animated: true, completion: nil)
            if let popOver = activityVC.popoverPresentationController {
                popOver.sourceView =  view.view
              //popOver.sourceRect =
              //popOver.barButtonItem
            }
        } else if UIDevice.current.userInterfaceIdiom == .phone {
            print("iphone")
            view.present(activityVC, animated: true, completion: nil)
        }
    }
}

iPad错误:

> [LayoutConstraints] Unable to simultaneously satisfy constraints.
>   Probably at least one of the constraints in the following list is one
> you don't want.   Try this:       (1) look at each constraint and try to
> figure out which you don't expect;        (2) find the code that added the
> unwanted constraint or constraints and fix it.  (
>     "<NSLayoutConstraint:0x60000188f890 LPLinkView:0x7fdd2a70d200.leading ==
> UILayoutGuide:0x6000002ac0e0'UIViewLayoutMarginsGuide'.leading  
> (active)>",
>     "<NSLayoutConstraint:0x600001889d10 H:[LPLinkView:0x7fdd2a70d200]-(59)-|   (active, names:
> '|':_UIActivityContentTitleView:0x7fdd2a70cde0 )>",
>     "<NSLayoutConstraint:0x6000018e50e0 H:|-(0)-[_UIActivityContentTitleView:0x7fdd2a70cde0]   (active, names:
> '|':_UINavigationBarContentView:0x7fdd27dae070 )>",
>     "<NSLayoutConstraint:0x6000018e5590 _UIActivityContentTitleView:0x7fdd2a70cde0.trailing == _UINavigationBarContentView:0x7fdd27dae070.trailing   (active)>",
>     "<NSLayoutConstraint:0x600001893520 'UIView-Encapsulated-Layout-Width'
> _UINavigationBarContentView:0x7fdd27dae070.width == 0   (active)>",
>     "<NSLayoutConstraint:0x60000188f840 'UIView-leftMargin-guide-constraint'
> H:|-(16)-[UILayoutGuide:0x6000002ac0e0'UIViewLayoutMarginsGuide'](LTR)
> (active, names: '|':_UIActivityContentTitleView:0x7fdd2a70cde0 )>" )
> 
> Will attempt to recover by breaking constraint 
> <NSLayoutConstraint:0x60000188f890 LPLinkView:0x7fdd2a70d200.leading
> == UILayoutGuide:0x6000002ac0e0'UIViewLayoutMarginsGuide'.leading   (active)>
> 
> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints
> to catch this in the debugger. The methods in the
> UIConstraintBasedLayoutDebugging category on UIView listed in
> <UIKitCore/UIView.h> may also be helpful.

如何解决在Xpad 11,IOS 13的ipad上共享文本的问题?

我的TableViewController没有约束警告

谢谢