Files
Folo/apps/mobile/native/ios/Utils/Utils.swift
T
Innei b534667c05 feat(mobile): enhance HTML renderer with image rendering and blurhash support
- Add blurhash and image scaling to MarkdownImage component
- Implement useCalculateNaturalSize hook for responsive image sizing
- Create atoms and types for entry model and media
- Update HTML renderer to support dynamic image rendering with Jotai state management
- Improve iOS image preview with save functionality and dynamic root view controller retrieval

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-08 19:12:47 +08:00

27 lines
570 B
Swift

//
// Utils.swift
// FollowNative
//
// Created by Innei on 2025/2/7.
//
import Foundation
import UIKit
private class Noop {}
enum Utils {
static let bundle = Bundle(for: Noop.self)
static let accentColor =
UIColor(named: "Accent", in: bundle, compatibleWith: nil) ?? UIColor.systemBlue
static func getRootVC() -> UIViewController? {
if let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let window = scene.windows.first,
let rootVC = window.rootViewController {
return rootVC
}
return nil
}
}