-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 #29 from Desbeers/main
Reduce amount of compiler directives
- Loading branch information
Showing
4 changed files
with
104 additions
and
130 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// File.swift | ||
// | ||
// | ||
// Created by Nick Berendsen on 07/09/2023. | ||
// | ||
|
||
#if os(macOS) | ||
import AppKit | ||
#else | ||
import UIKit | ||
#endif | ||
|
||
|
||
#if os(macOS) | ||
|
||
/// Alias for NSImage | ||
public typealias SWIFTImage = NSImage | ||
|
||
/// Alias for NSColor | ||
public typealias SWIFTColor = NSColor | ||
|
||
let primaryColor = NSColor.labelColor | ||
let backgroundColor = NSColor.windowBackgroundColor | ||
|
||
/// Alias for NSFont | ||
public typealias SWIFTFont = NSFont | ||
|
||
#else | ||
|
||
/// Alias for UIImage | ||
public typealias SWIFTImage = UIImage | ||
|
||
/// Alias for UIColor | ||
public typealias SWIFTColor = UIColor | ||
|
||
/// Alias for UIFont | ||
public typealias SWIFTFont = UIFont | ||
|
||
let primaryColor = UIColor.label | ||
let backgroundColor = UIColor.systemBackground | ||
|
||
#endif |
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
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
Oops, something went wrong.