0
팝업 제어기로 내 View Controller를 추가하려고합니다. 그러나 모든 것이 내가보기에 밑바닥에서 미끄러지는 코드를 사용하고 내가 원하는대로 사용하지 않습니다. 다음은 어떤 도움을 이해할 수있을 것이다보기 컨트롤러를 Swift 3.0의 팝업 제어기로 표시 할 수 없습니다.
표시 나는 이미지로 원하는 내가
let storyboard : UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let popupVC = storyboard.instantiateViewController(withIdentifier: "WSFilterViewController") as! WSFilterViewController
popupVC.modalPresentationStyle = UIModalPresentationStyle .popover
popupVC.preferredContentSize = CGSize (width: 300, height:300)
let pVC = popupVC.popoverPresentationController
pVC?.permittedArrowDirections = UIPopoverArrowDirection.any
pVC?.delegate = self as? UIPopoverPresentationControllerDelegate
self.present(popupVC, animated: true, completion: nil)
을 사용하고 코드입니다. 사전
docs의 설명과 같습니다 : 수평 적으로 컴팩트 한 환경에서는이 옵션이 fullScreen과 동일하게 작동합니다. – Kubba
iPad 또는 iPhone 기기를 사용하고 계십니까? –
소스보기, sourceRect 및 대표자가 누락되었습니다. –