NuPlay / RichText

Easily show RichText(html) in SwiftUI
MIT License
209 stars 36 forks source link

Support mac osx #36

Closed studiogaram closed 1 year ago

studiogaram commented 1 year ago
  1. Use 'canimport' flag to organize the codes related to UIKit. (If UIKit is not available, AppKit determined that it is available and wrote the code.)
  2. WKWebView on Mac does not have UIScrollView, unlike WKWebView on iOS. Therefore, we created and used 'ScrollAdjustedWKWebView', which overrides the 'scrollWheel' function so that the surrounding UIScrollView can be scrolled.
  3. Mac does not offer the SFSafariView Controller. Therefore, do not support .sfsafariview in an environment without UIKit.Use Safari as the default for link selection.

PS. MessageUI deleted the import code because it appears to be an unused framework. You can rewrite it when you want.

related issue link: https://github.com/NuPlay/RichText/issues/34

NuPlay commented 1 year ago

LGTM! Thanks for resolving the issue on my behalf.

I will review and release it.