Add raster panel icon family
This commit is contained in:
parent
c81712b781
commit
60cc48a4b7
278 changed files with 1992 additions and 621 deletions
|
|
@ -10,6 +10,8 @@ INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphone*] = YES
|
|||
INFOPLIST_KEY_UIStatusBarStyle[sdk=iphone*] = UIStatusBarStyleDefault
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad[sdk=iphone*] = UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone[sdk=iphone*] = UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight
|
||||
ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES[sdk=iphone*] = BurrowPanel02 BurrowPanel03 BurrowPanel04 BurrowPanel05 BurrowPanel06
|
||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS[sdk=iphone*] = YES
|
||||
TARGETED_DEVICE_FAMILY[sdk=iphone*] = 1,2
|
||||
EXCLUDED_SOURCE_FILE_NAMES = MainMenu.xib
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,46 @@
|
|||
#if !os(macOS)
|
||||
import BurrowUI
|
||||
import SwiftUI
|
||||
#if os(iOS)
|
||||
import UIKit
|
||||
#endif
|
||||
|
||||
@MainActor
|
||||
@main
|
||||
struct BurrowApp: App {
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
#if os(iOS)
|
||||
BurrowView(appIconManager: UIKitAppIconManager())
|
||||
#else
|
||||
BurrowView()
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
@MainActor
|
||||
private struct UIKitAppIconManager: AppIconManaging {
|
||||
var supportsAlternateIcons: Bool {
|
||||
UIApplication.shared.supportsAlternateIcons
|
||||
}
|
||||
|
||||
var alternateIconName: String? {
|
||||
UIApplication.shared.alternateIconName
|
||||
}
|
||||
|
||||
func setAlternateIconName(_ iconName: String?) async throws {
|
||||
try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, any Error>) in
|
||||
UIApplication.shared.setAlternateIconName(iconName) { error in
|
||||
if let error {
|
||||
continuation.resume(throwing: error)
|
||||
} else {
|
||||
continuation.resume(returning: ())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue