Allow rotaion in the attachment gallery

Closes #77
这个提交包含在:
Shadowfacts 2020-01-07 22:19:38 -05:00
父节点 db4312ee34
当前提交 bb86e1aafd
签署人:: shadowfacts
GPG 密钥 ID: 94A5AB95422746E5
共有 4 个文件被更改,包括 26 次插入0 次删除

查看文件

@ -69,6 +69,8 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>

查看文件

@ -35,6 +35,14 @@ class GalleryViewController: UIPageViewController, UIPageViewControllerDataSourc
return viewControllers?.first
}
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
if UIDevice.current.userInterfaceIdiom == .phone {
return .allButUpsideDown
} else {
return .all
}
}
init(attachments: [Attachment], sourcesInfo: [LargeImageViewController.SourceInfo?], startIndex: Int) {
self.attachments = attachments
self.sourcesInfo = sourcesInfo

查看文件

@ -10,6 +10,14 @@ import UIKit
class MainTabBarViewController: UITabBarController, UITabBarControllerDelegate {
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
if UIDevice.current.userInterfaceIdiom == .phone {
return .portrait
} else {
return .all
}
}
override func viewDidLoad() {
super.viewDidLoad()

查看文件

@ -29,6 +29,14 @@ class InstanceSelectorTableViewController: UITableViewController {
var urlHandler: AnyCancellable?
var currentQuery: String?
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
if UIDevice.current.userInterfaceIdiom == .phone {
return .portrait
} else {
return .all
}
}
init() {
super.init(style: .grouped)