-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from noppefoxwolf/hotfix/preferredScreenEdgesD…
…eferringSystemGestures Hotfix/preferred screen edges deferring system gestures
- Loading branch information
Showing
13 changed files
with
232 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
Example.swiftpm/Source/AppModule/App.swift → ...tpm/Source/SwiftUIExampleModule/App.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import SwiftUI | ||
import DebugMenu | ||
import Shared | ||
|
||
@main | ||
struct App: SwiftUI.App { | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import UIKit | ||
import DebugMenu | ||
import Shared | ||
|
||
@main | ||
class AppDelegate: NSObject, UIApplicationDelegate { | ||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { | ||
return true | ||
} | ||
|
||
func application( | ||
_ application: UIApplication, | ||
configurationForConnecting connectingSceneSession: UISceneSession, | ||
options: UIScene.ConnectionOptions | ||
) -> UISceneConfiguration { | ||
let configuration = UISceneConfiguration(name: nil, sessionRole: connectingSceneSession.role) | ||
configuration.sceneClass = UIWindowScene.self | ||
configuration.delegateClass = SceneDelegate.self | ||
return configuration | ||
} | ||
} | ||
|
||
class SceneDelegate: UIResponder, UIWindowSceneDelegate { | ||
var window: UIWindow? | ||
|
||
func scene( | ||
_ scene: UIScene, willConnectTo session: UISceneSession, | ||
options connectionOptions: UIScene.ConnectionOptions | ||
) { | ||
guard let windowScene = (scene as? UIWindowScene) else { return } | ||
window = UIWindow(windowScene: windowScene) | ||
window?.rootViewController = RootViewController() | ||
window?.makeKeyAndVisible() | ||
|
||
DebugMenu.install( | ||
windowScene: windowScene, | ||
items: [ | ||
ViewControllerDebugItem<ColorViewController>(builder: { $0.init(color: .blue) }), | ||
ClearCacheDebugItem(), | ||
UserDefaultsResetDebugItem(), | ||
CustomDebugItem(), | ||
SliderDebugItem(title: "Attack Rate", current: { 0.1 }, range: 0.0...100.0, onChange: { value in print(value) }), | ||
KeyValueDebugItem(title: "UserDefaults", fetcher: { completions in | ||
let envelops = UserDefaults.standard.dictionaryRepresentation().map({ Envelope(key: $0.key, value: "\($0.value)") }) | ||
completions(envelops) | ||
}), | ||
GroupDebugItem(title: "Info", items: [ | ||
AppInfoDebugItem(), | ||
DeviceInfoDebugItem(), | ||
]), | ||
], dashboardItems: [ | ||
CPUUsageDashboardItem(), | ||
CPUGraphDashboardItem(), | ||
GPUMemoryUsageDashboardItem(), | ||
MemoryUsageDashboardItem(), | ||
NetworkUsageDashboardItem(), | ||
FPSDashboardItem(), | ||
ThermalStateDashboardItem(), | ||
CustomDashboardItem(), | ||
IntervalDashboardItem(title: "Reduce time", name: "dev.noppe.calc") | ||
], options: [.showsWidgetOnLaunch] | ||
) | ||
} | ||
} | ||
|
||
class RootViewController: UIViewController { | ||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
view.backgroundColor = .systemBackground | ||
} | ||
|
||
override var preferredScreenEdgesDeferringSystemGestures: UIRectEdge { .all } | ||
} |
11 changes: 11 additions & 0 deletions
11
Example.swiftpm/Source/UIKItExampleModule/Assets.xcassets/AccentColor.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
98 changes: 98 additions & 0 deletions
98
Example.swiftpm/Source/UIKItExampleModule/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "60x60" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "60x60" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "76x76" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "76x76" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "83.5x83.5" | ||
}, | ||
{ | ||
"idiom" : "ios-marketing", | ||
"scale" : "1x", | ||
"size" : "1024x1024" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Example.swiftpm/Source/UIKItExampleModule/Assets.xcassets/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters