Copy
View this email in your browser

Hi <<First Name>>,

Here are excerpts from the latest posts from my blog since your last delivery. Enjoy!

Swift API Docs for String.index(_:offsetBy:limitedBy:) Is Still Misleading

published on Jan 23, 2020 10:30 am
When you look at the docs for String.index(_:offsetBy:limitedBy:), you get this description: Returns an index that is the specified distance from the given index, unless that distance is beyond a given limiting index.
Read in browser »

MultiMarkdown Filter for nanoc

published on Jan 22, 2020 09:53 am
I recently dropped blog posts rendered via MultiMarkdown. I used MMD to support citations, but this is not a book, this is a website! So I retired my MultiMarkdown processor for nanoc, the static site generator that I use. If you need something like it for your project, here it is:
Read in browser »

Lock App Features Behind a Paywall and Enforce the Lock in Code

published on Jan 21, 2020 07:56 am
I stumbled upon an interesting coding problem in a recent macOS project related to in-app purchases. IAP can be represented by a feature option set in code. How do you secure UserDefaults access in such a way that accessing values can be locked via the IAP available feature options? (This also applies to tiered licenses, like a “Basic” and a “Pro” feature set.)
Read in browser »

Show Light Text on Dark Recessed NSButton with an Image

published on Jan 18, 2020 10:45 am
This is how I made dark NSButton with the NSButton.BezelStyle.recessed display legible light text on dark background with macOS Mojave an up. Recently, a user of The Archive pointed out that the in-app guide doesn’t display properly with a light system appearance. In dark mode, you wouldn’t notice the problem, but in light mode, the button colors rendered them illegible. Only when you press a button does its text light up properly for its background color. Have a look:
Read in browser »

Whole Value Pattern

published on Jan 17, 2020 04:49 pm
I often forget the name of this thing, then I search for it, and forget it again later. It’s the Whole Value Pattern. The “Whole Value” pattern means you should get rid of using primitive or literal data types as quickly as possible. (Since Swift has no non-object primitives, you have to look a bit harder to spot these, but “literal value” is a pretty good indicator.)
Read in browser »



 

Recent Articles:

Maybe Call Your UI Configurion Objects ViewData Instead of ViewModel
AppMover Swift Library to Move Your macOS App to the Applications Folder
Community Trumps All
SwiftRex - Redux for Swift with Reactive Capabilities
Facilitate Non-Artists to Sketch

Have a great rest of your day!
Copyright © 2020 Christian Tietze, All rights reserved.


unsubscribe from this list    update subscription preferences 

Email Marketing Powered by Mailchimp