Douglas-Peucker algorithm

This post is a part of the series about shapes recognition. This post is also available as a part of a playground. Curve preprocessing. When drawing by hand, especially in a slow manner, we will get a lot of touch points and the resulting curve will contain lots of close…

Freehand drawing

This post is a part of the series about shapes recognition. This post is also available as a part of a playground. Naive implementation of rendering user's freehand drawing is strait forward. We need to listen to touch events from view and construct the path appending lines to each subsequent…

Custom UITextView in Swift

In this article I want to describe how I developed custom UITextView component in Swift using TextKit, Playgrounds and IBDesignable and IBInspectable directives. You can check out source code on github. In this component we will add "read more" behaviour to text view. It will have two modes…