Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
Informative DevForum posts from everyone's favorite DTS member.
(Arranged newest to oldest)
// Excerpt from https://github.com/krzyzanowskim/CoreTextWorkshop | |
// Licence BSD-2 clause | |
// Marcin Krzyzanowski [email protected] | |
func getSizeThatFits(_ attributedString: NSAttributedString, maxWidth: CGFloat) -> CGSize { | |
let framesetter = CTFramesetterCreateWithAttributedString(attributedString) | |
let rectPath = CGRect(origin: .zero, size: CGSize(width: maxWidth, height: 50000)) | |
let ctFrame = CTFramesetterCreateFrame(framesetter, CFRange(), CGPath(rect: rectPath, transform: nil), nil) |
.onDrop(of: [.fileURL], isTargeted: nil) { providers in | |
if let loadableProvider = providers.first(where: { $0.canLoadObject(ofClass: URL.self) }) { | |
_ = loadableProvider.loadObject(ofClass: URL.self) { fileURL, _ in | |
if let fileURL = fileURL, fileURL.pathExtension.lowercased() == "zip" { | |
self.logger.info("Dropped \(fileURL.path)") | |
DispatchQueue.main.async { | |
importer.open(zipArchiveURL: fileURL) | |
} | |
} | |
} |
Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
Informative DevForum posts from everyone's favorite DTS member.
(Arranged newest to oldest)
# A Best in Class Checklist | |
A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10. | |
> To use this, create a Github Issue in your own repo, and simply copy and paste this text. | |
## iOS Core Technology | |
_Things any iOS app can benefit from_ | |
- [ ] iCloud Sync | |
- [ ] Focus Filter Support |
include: package:pedantic/analysis_options.yaml | |
analyzer: | |
exclude: [build/**] | |
strong-mode: | |
implicit-casts: false | |
errors: | |
uri_has_not_been_generated: ignore | |
override_on_non_overriding_method: error | |
unused_element: error | |
unused_import: error |
Change Apple OS X Dock size from Apple Terminal
defaults write com.apple.dock tilesize -int 32; killall Dock
32
is icon size
The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).
My take-aways are:
You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.
Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
Author: Chris Lattner
Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.
And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export to tokens.
If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.