Skip to content

Category: Tutorials

Postman collections: Making API testing great again!

Posted in Building future-proof software, Development, and Tutorials

Turning shaky code into future-proof software

Over the past years, we moved more and more towards web-oriented architectures, connecting to services in order to provide information. Along with the evolution of testing tools and development methodologies we can build crazily robust software. However, it happens that sometimes we will not build unit tests because of project constraints. Those reasons often go from time pressure on a project to laziness but I am not here to judge.

Set tint color on an image in a NSAttributedString

Posted in Development, and Tutorials

(2018-08-23 EDIT) Updated the post and re-created the code from almost scratch using XCode 10.0 beta 6 and iOS 12. Code written using Swift 4. (/EDIT).

Introduction

Hi everyone, I have been working, for a few days now, on a project that requires to make an app fully customisable from a configuration file. I was coding and coding and coding, extracting color definitions, applying tints on images, when I ran into an issue. I could not apply tint over a mutable attributed string, nor simple attributed string for that matter. So I was there, looking at my NSAttributedString and my NSTextAttachment without any property allowing me to change only the image color.