Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Sep 25, 2023. It is now read-only.

Commit f8b77fd

Browse filesBrowse files
author
Oleg Poyaganov
authored
Merge pull request #4 from GregOriol/master
Minor and quick-fixes for the demo app to work on iPads
2 parents 9de8c0e + 39c1fd1 commit f8b77fd
Copy full SHA for f8b77fd

File tree

2 files changed

+5
-4
lines changed
Filter options

2 files changed

+5
-4
lines changed

‎example/fast-neural-style/ios/StyleTransfer/Info.plist

Copy file name to clipboardExpand all lines: example/fast-neural-style/ios/StyleTransfer/Info.plist
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
<key>UISupportedInterfaceOrientations~ipad</key>
4242
<array>
4343
<string>UIInterfaceOrientationPortrait</string>
44-
<string>UIInterfaceOrientationPortraitUpsideDown</string>
45-
<string>UIInterfaceOrientationLandscapeLeft</string>
46-
<string>UIInterfaceOrientationLandscapeRight</string>
4744
</array>
4845
</dict>
4946
</plist>

‎example/fast-neural-style/ios/StyleTransfer/ViewController.swift

Copy file name to clipboardExpand all lines: example/fast-neural-style/ios/StyleTransfer/ViewController.swift
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP
6666
let cancelAction = UIAlertAction(title: "Cancel", style: .cancel) { (action) in
6767
}
6868
alert.addAction(cancelAction)
69-
69+
70+
if UIDevice.current.userInterfaceIdiom == .pad {
71+
alert.popoverPresentationController?.sourceView = self.view
72+
}
73+
7074
present(alert, animated: true, completion: nil)
7175
}
7276

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.