Ad

Our DNA is written in Swift
Jump

Asynchronous NSTextAttachments (2/2)

In the first part of this two-part blog post, you saw how NSAttributedString works with remote images when parsing HTML, namely synchronously downloading them. I teased that I found a way to have NSTextAttachment also work asynchronously. In this second part I will walk you through how this is achieved.

Read more

Asynchronous NSTextAttachments (1/2)

In iOS 7, Apple introduced the NSTextAttachment class for embedding images into attributed strings. OS X, pardon macOS, did have this feature much earlier, already as early as 2001 in version 10.0 “Cheetah”. I suspect that they needed 7 years to migrate because the first needed to revamp the inner workings of UITextView and UITextField to natively work with attributed text, as well as modernize CoreText into what is nowadays referred to as TextKit.

With iOS 10 being released, we now have 3 major iOS releases supporting text attachment in standard UIKit views. About time, that we start using text attachments for displaying inline images in rich text.

Read more

An Update on Custom Modal Presentations

Customizing a modal presentation of a view controller would be tricky before iOS 7. It got much easier with the addition of the transitioningDelegate protocol. This delegate would be able to vend an animation controller and an interaction controller for presentation and dismissal on the view controller which implemented them.

Without that, if you wanted a “burger menu” then you had to implement a custom container controller like I did with DTSidePanel in DTFoundation 1.4, three years ago. Things have gotten much easier a year ago.

A client of ours liked the way the Linked In app showed related apps in a modal side panel and so I went to research how you would that most reusably nowadays.

Read more

Survival of the Swiftest

While preparing for my talk for mDevCamp 2016, I was working on a new project interfacing with a RESTful web service. This allowed me to design the API without having to consider compatibility with Objective-C. As a result I could employ several advanced Swift techniques, and in this talk I am explaining these.

Read more

mDevCamp 2016

Conferences in movie theaters seem to be thing these days. A thing we like! This year’s sixth instalment of mDevCamp was the first time with comfortable seats and an unobstructed giant view of the speaker’s slides from every angle.

Read more

BarCodeKit 1.3.1

BarCodeKit can generate lots of different kinds of 1D barcodes. The previous update coincided with the release the Barcodes with iOS book. This release rolls up a few tweaks and adds a new rendering option.

Read more

DTMarkdownParser 0.2.2

DTMarkdownParser is a sequential parser for markdown, with a similar sequential paradigm as NSXMLParser. I started this project in 2013 as a training case for TDD and going for 100% code coverage by unit tests.

Apparently this nifty little project of mine has some fans, so we are publishing a new release today to include all the improvements that were made in that 2.5 years… 😉

Read more

Invalid File Frameworks

It’s been a while since I last submitted a build of prod.ly to the iTunes. So I figured, I should update Cocoapods to the latest version and do a pod update. The archiving went find, but then I saw a new iTunes error when I tried to upload the build.

Read more

Fixing Xcode 7.3 Warnings

The updates to LLVM packaged with Xcode 7.3 cause several new warnings. Most of them related to Swift, but there are also a few bugging us in legacy Objective-C code.

Read more

DTFoundation 1.7.10

This bug fix release for DTFoundation addresses some build problems that resulted from updating to Xcode 7.3 as well.

Read more