iOS modules: HeaderedTabScrollView, SwiftyComments & SwiftyMercuryReady

While developing iOS apps, I often have to make custom components. I like building them independently from the main project. This makes them more maintainable, testable and helps keeping the main project clean. It also makes them easily reusable and implementable in other projects.

Here are three of those components I’ve built.

HeaderedTabScrollView

The main features of this component are:

  • choice between an ACTabScrollView and PageMenu
  • fully customizable header view
  • support for custom scrolling-animations
  • lightweight and easy to use

More info on its github page.

SwiftyComments

SwiftyComments is highly customizable TableView based component handling hierarchical discussion threads.

The view inside each comment cell are fully customizable.

Several other examples and an explanation on how it works and how to use it are available on its github repo here.

SwiftyMercuryReady

This module aims to add a “reader” feature to a WKWebView.

It uses the Mercury Api to parse a webpage and retrieve the relevant parts of it (title, body text, etc). Then it loads those informations in a clean HTML template (that’s rendered in a WKWebView) which allows to control the font size & style and the theme (dark or light).

The project is made of three parts:

  • a Mercury Api wrapper that just handles the requests to the API;
  • a WKWebView subclass rendering the HTML template and the “reader version” of an article;
  • a more complete webView allowing the user to enable/disable the reader.

The project is described in more details and available here.