Utils.swift 365 B

12345678910111213141516171819202122
  1. //
  2. // Utils.swift
  3. // Logseq
  4. //
  5. // Created by leizhe on 2022/5/23.
  6. //
  7. import Foundation
  8. import Capacitor
  9. @objc(Utils)
  10. public class Utils: CAPPlugin {
  11. @objc func isZoomed(_ call: CAPPluginCall) {
  12. var isZoomed: Bool {
  13. return UIScreen.main.scale < UIScreen.main.nativeScale
  14. }
  15. call.resolve(["isZoomed": isZoomed])
  16. }
  17. }