blog
blog copied to clipboard
🍁 What you don't know is what you haven't learned
Use [react-markdown](https://github.com/remarkjs/react-markdown) to parse markdown content, `react-syntax-highlighter` to highlight code, and `rehype-raw` to parse raw html ```js import ReactMarkdown from "react-markdown" import { Prism as SyntaxHighlighter } from "react-syntax-highlighter" import...
Use QuickLookThumbnailing framework ```swift import AppKit import QuickLookThumbnailing actor QuicklookService { static let shared = QuicklookService() private let generator = QLThumbnailGenerator.shared func image( fileUrl: URL, size: CGSize ) async ->...
Perform check before and after suspension point ```swift actor Worker { var isDoing = false var toBeDone = Set() func work(string: String) async { if isDoing { toBeDone.insert(string) return }...
Make an parallelTask function that wraps TaskGroup ```swift public func parallelTask(@ParallelTaskBuilder builder: () -> [ParallelTaskBuilder.Work]) async { await withTaskGroup(of: Void.self) { group in for work in builder() { group.addTask {...
Go to test target, under `Host Application`, select another app target, and select the preferred app target again
## Resources - https://www.tailwindawesome.com/ - https://daisyui.com/ - https://www.hyperui.dev/ - https://tailwind-elements.com/ - https://tailwindtemplates.co/ Paid - https://flowbite.com/ - https://tailwindui.com/ - https://tailgrids.com/
When we add another `UIWindow`, then its rootViewController will decide the style of the status bar, not the rootViewController of the `keyWindow` anymore ### childForStatusBarStyle The usual way to fix...
Apply `tintColor` does not seem to have effect. ```swift datePicker.setValue(UIColor.label, forKeyPath: "textColor") datePicker.setValue(false, forKey: "highlightsToday") ```
## Read more - https://swdevnotes.com/swift/2022/customise-a-line-chart-with-swiftui-charts-in-ios-16/ - https://github.com/jordibruin/Swift-Charts-Examples
## Read more - https://developer.apple.com/documentation/widgetkit/making-a-configurable-widget - [What is the purpose of getSnapshot method from WidgetKit](https://developer.apple.com/forums/thread/663155)