Put unit tests next to tested Swift code, and run tests from the same Xcode target.| Marcin Krzyżanowski
In Part 2, I discussed selected font metrics. Now let's see how to layout text line or lines. Text Layout Text layout is non-trivial task. CoreText provides handful of useful functions to layout text in a rectangle frame, or along a custom path. The most common usecase is| Marcin Krzyżanowski
In Part 1, I created a label view, where I draw a text in it. Now let's see what happened there: Font & Attibuted String How about font? Font is important part of drawing text. CoreText relies on Attributed String. Simple NSAttributedString() instance without any attribute, defaults to| Marcin Krzyżanowski
Ever wanted to layout letters? implement label view? create text edit component from the ground? bear with me. CoreText is low-level framework for laying out text and handling fonts. Low level like "C language level low", but also like "Font glyph level low". What CoreText can:| Marcin Krzyżanowski
In February 2020, a keyboard in my MacBook Pro 15.4-inch (model 2018) has broken down. I noticed typical repeating keys. Nothing new for the MacBook with the butterfly keyboard. I also noticed I have screen scratch (that I connect with staingate). I bought it in July 2018, which is| Marcin Krzyżanowski
Let's face the truth. If happen you work with any other data format than JSON, you're in a 10% niche (estimates may vary). Even though the default JSONEncoder for Swift Codable is not the fastest - it's soooo convenient to use. Just make a| Marcin Krzyżanowski
The way URL Bookmarking is designed and implemented, makes it untrusty source of truth. It can be esily misused, that makes bookmark useless.| Marcin Krzyżanowski
Mobile experience Apple changes Terms of Service and me, as a paid Developer Program Membership have to accept new agreement. So I open App Store Connect app - introduced in Jan 4, 2018 - so pretty new product. Not new enough to display web view with an agreement text and| Marcin Krzyżanowski
what? In short: dynamic linking happened. Dynamic linking - what it is? It's an operation that happens when part of the code spreads across different files (called libraries), and the binary content of the library is loaded in runtime. A dynamic linker (which is a system tool) finds| Marcin Krzyżanowski
Design a project that uses different versions of swift for different parts of the project. Combine multiple toolchains together and use it.| Marcin Krzyżanowski
You use Swift AnyObject wrong. Don't use AnyObject as a generics constraint. Don't do "is AnyObject", "as? AnyObject" to check if a variable is a class type. Don't use "AnyObject". Use "class" for a class-only protocol. Use "Any".| Marcin Krzyżanowski
Last week I had my last appearance with talk about Swift runtime performance. I enjoy the topic, and I had a ton of fun with preparing the speech, with the on-stage experience and afterward discussions. Since I'm done with this talk, I'd like to make a| Marcin Krzyżanowski
Yes, ObjectivePGP is backed by the organization of a Fortune 500 company founder. We signed a 1-year long grant agreement, two months ago, and I'm delighted with it. What does that mean? That happened. My three years old project got funding. Around May we had the first talk| Marcin Krzyżanowski
Stop doing the apps. Start selling t-shirts. I spent an enormous amount of time doing apps, or even programs (before we begun to call it apps). I spent days on doing more or less challenging stuff like PGP [https://github.com/krzyzanowskim/ObjectivePGP] implementation or Cryptography [https://github.com/krzyzanowskim/| Marcin Krzyżanowski
After 4 years with Apple's TextKit 2: The promised 'better' text engine has unstable scrolling, unreliable height estimates, and viewport issues so bad that even Apple's TextEdit suffers from them. Good architecture, but the implementation makes it frustratingly difficult for real-world apps.| Marcin Krzyżanowski