2017-02-02 2 views
0

입니다. readerVC의 방향을 세로 및 가로로 만드는 방법이 있습니다.아래 예제에서 스토리 보드에없는 viewController 방향을 바꾸는 방법은

override var supportedInterfaceOrientations: UIInterfaceOrientationMask { 
    return .all 
} 

을 또는 당신은 return .allButUpsideDown, return .portrait을 할 수 - 당신은 지정 원하는 :

func loadReader(filePaht : String) { 

      let document = ReaderDocument(filePath: filePaht, password: nil) 
      if document != nil { 
       let readerVC = ReaderViewController(readerDocument: document) 
       readerVC?.delegate = self 
       readerVC?.modalTransitionStyle = UIModalTransitionStyle.crossDissolve 
       readerVC?.modalPresentationStyle = UIModalPresentationStyle.fullScreen 
       self.navigationController?.pushViewController(readerVC!, animated: true) 

       UIApplication.shared.isStatusBarHidden = true 
      } 
     } 

답변

0

당신은 지원되는 인터페이스의 방향을 재정의 할 수 있습니다.

+0

작동하지 않습니다. – Khallad

관련 문제