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 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. …
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
QLPreviewControllerDataSource objects are just protocols, you have to create concrete types in order to use them.
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:
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.
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.
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:
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.
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.
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…
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:
I figured this would be a nice progression…
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, brieﬂy describe the feature, get the reader…
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.