The UIScrollView control enables you to present more content than can appear on a single screen. Scrolling is a common approach to managing content overflow, typically when the amount of content far exceeds the view.

Scroll view controls are broken in to two parts:

  • The View Port
  • The Content Container

The View Port is the window through which you view the Content Container. In theory the Content Container can be infinite in size on any plane, be it horizontal, vertical, or both. …


By using the Quick Look Framework

If you need in your app to present a document like a PDF, a bunch of images, or even a Microsoft Office or iWork document, you can use the Quick Look Framework that ships with iOS.

You start by importing the QuickLook framework into your project file. You then create a QLPreviewController, create a QLPreviewControllerDataSource, hand in as many QLPreviewItem instances to the data source as you need, and then present the controller. The only wrinkle here is that the QLPreviewItem and QLPreviewControllerDataSource objects are just protocols, you have to create concrete types in order to use them.

Before we…


Miners Run iOS Endurance Game

I’ve been an iOS developer for a good few years now, and I have never managed to release anything under my own name… until now.

It gives me great pleasure to introduce to you Morris:

http://youtu.be/rtWR2lzpNZs

Miners Run has been a work in progress since February 2014. I used the new SpriteKit framework that Apple released with iOS7; I greatly enjoyed working with this framework — despite finding the inevitable bugs you find along the way when you work with anything that new and complex.

If you like the look of the trailer please take a look at the game in the AppStore, your support would be greatly appreciated; Morris even has his own website.


Using Xcode

Pull to Refresh is a common idiom on iOS—originally made popular by the folks at Twitter. This approach to refreshing a view has become so ubiquitous Xcode now enables you to add this feature to your views in just a few simple steps. This post is about how to do exactly that… in 30 seconds!

Before we start the clock, create a new project in Xcode—containing a storyboard with a UITableViewController and a backing code file for the view controller; with that in place, we’re ready to start.

  • In Xcode, in Main.storyboard, in the Document Outline pane, select View Controller


With AutoLayout

A UITextView does not automatically resize in a UIView when you use AutoLayout alone; code is required—specifically, code similar to this:

CGSize size = self.textView.contentSize;
self.textViewHeightConstraint.constant = size.height;

For this approach to work it is important that you place these lines in the right place—in the viewDidAppear method—and that you have created an outlet for a height constraint on the target UITextView—called textViewHeightConstraint in the example above.

To achieve the same effect with a UITableViewCell the approach is the same; but this time you enumerate through the visible cells and then set the content height value for the constraint:

UITableView…


Image for post
Image for post
Paul Jackson 

Make all visual distinctions as subtle as possible, but still clear and effective.

Edward R. Tufte—Visual Explanations p.73

Tufte describes this principal as the ‘Occam’s razor’ of information design. You take a visual element, such as a border on a image or a background for a table cell, then ask yourself: is the difference here noticeable, and no more.

Use less to show more. When creating designs, screens, web pages, information graphics, the idea is to use just noticeable differences.


Image for post
Image for post
npm / Paul Jackson

Developing Node Modules

Working with Node.js typically means you also work with npm. A lot. If you work with node and you’re not using npm—a lot—then you’re probably missing a trick or two.

My first tip on npm is linking. What is linking and why should I care? Linking provides a way for you to develop elements of your application as different packages, typically because you would like reusable dependencies—and you should care because it. is. awesome.

Consider this:

You’re developing an application that needs a client module for modelling some RFC. Unfortunately no-one has written a client for that particular RFC, so…


Image for post
Image for post
Photo By: http://www.flickr.com/photos/roberts87/

Node.js by example

As part of my book ideas I thought about the sample apps I would need to write to create this book. I came up with about 10 different ideas, some of which built on top of one another, and some that didn’t.

Having thought about this some more I’ve come up with this list of 7 apps that I think would work great for a book:

  • Static web site
  • Dynamic web site / application
  • Web sockets application
  • Interactive data visualisation
  • Web API / REST server
  • TCP socket based application
  • Native desktop application

I figured this would be a nice progression…


Image for post
Image for post
Nodejs.Org

A tale of two book ideas

I want to write a book. A book about Node.js. I have a few ideas and today I formalised a couple of those ideas into two proposals. I have sent them off to my preferred publisher and hopefully they won’t laugh at me too hard—and I thought I’d share what I’m thinking of writing about.

First up: Node.js—Beyond the documentation

The idea behind this proposal is this:

The core idea with this is book is to take some of the key elements from the Node.js documentation as a starting point for each chapter, briefly describe the feature, get the reader…


Image for post
Image for post
Raspberry Pi / Paul Jackson

Opening files on the Raspberry Pi in TextMate

I love working with text on my Mac; I tend to write large documents in iA Writer and code with TextMate 2 or Xcode, which for me, is a very pleasing experience all round—having recently bought a Raspberry Pi I wanted to extend the awesome into that world too. However, as you may already know, TextMate is a Mac only product—but I have found a way, a really nice way, to work with text files on my Pi in TextMate and it’s called: RMate.

RMate is a Ruby Gem—otherwise known as a package—that bridges the two worlds over an SSH

Paul Jackson

Designer, iOS/macOS Developer; rider of motorcycles

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store