Skip to content

Commit

Permalink
Removes backward compatibility code since the library targets macOS 1…
Browse files Browse the repository at this point in the history
…1 and later
  • Loading branch information
tomdai committed May 16, 2023
1 parent 3fce5cd commit a50704f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Sources/MarkdownWebView/MarkdownWebView.swift
Expand Up @@ -82,12 +82,8 @@ public struct MarkdownWebView: PlatformViewRepresentable {

/// Set transparent background.
#if os(macOS)
if NSAppKitVersion.current.rawValue > 1500 {
self.platformView.setValue(false, forKey: "drawsBackground")
}
else {
self.platformView.setValue(true, forKey: "drawsTransparentBackground")
}
self.platformView.setValue(false, forKey: "drawsBackground")
/// Equavalent to `.setValue(true, forKey: "drawsTransparentBackground")` on macOS 10.12 and before, which this library doesn't target.
#elseif os(iOS)
self.platformView.isOpaque = false
#endif
Expand Down

0 comments on commit a50704f

Please sign in to comment.