iOS swift ipad浣跨敤绯荤粺鑷甫鍒嗕韩 寮规澶辫触娌℃湁寮规

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了iOS swift ipad浣跨敤绯荤粺鑷甫鍒嗕韩 寮规澶辫触娌℃湁寮规相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/%e8%87%aa%e5%b8%a6' title='鑷甫'>鑷甫   ==   rect   鍒嗕韩   exclude   use   ipad   height   perm   

 

鏄洜涓篿OS13涓婄殑涓嶆敮鎸侀€傞厤

let activity = UIActivityViewController(activityItems: [URL(fileURLWithPath: path)], applicationActivities: nil)
        
        activity.excludedActivityTypes = [.print]
        
        //闇€瑕佸仛涓€涓?iPhone 鍜?iPad鐨勫垽鏂?/span>
        if UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.pad {
            activity.modalPresentationStyle = .popover
            activity.popoverPresentationController?.sourceView = self.view
            activity.popoverPresentationController?.sourceRect = CGRect(x: Screen.width, y: Screen.height/2, width: 0, height: 0)
            activity.popoverPresentationController?.permittedArrowDirections = UIPopoverArrowDirection(rawValue: 0)
        }
        self.present(activity, animated: true, completion: nil)

 

以上是关于iOS swift ipad浣跨敤绯荤粺鑷甫鍒嗕韩 寮规澶辫触娌℃湁寮规的主要内容,如果未能解决你的问题,请参考以下文章

Playgrounds鍙互鍦╩acOS绯荤粺涓婁娇鐢ㄥ暒

MySQL涔嬪垵浣跨敤

浣跨敤Visual Studio 2015寮€鍙慉ndroid 绋嬪簭

娴呰皥 Mac 榛戣嫻鏋?Hackintosh 瀹夎浣跨敤