Dead simple singleton implementation
Over the times I made plenty of exotic singleton implementations, but lately I started to use this lightweight structure. Simply a class holds a static pointer, and whenever you create an instance, it will be assigned to that pointer. You can access it via a single class method. In terms of code it needs a […]
Create iOS 7 blur effect with latest APIs
Blurred overlay effect itself was at the table for ages, though, incorporating it in iOS 7 gave a huge shot to it’s popularity. Creating an iOS 7 blur effect basically involves two step, create a snapshot of the underlying content of some context, and apply a blur on it. There are numerous approach out there, this solution involves some fresh APIs.
Simplest way to load UIView from Xib files
The method has three role player. First, an Interface Builder Xib file that holds a configured view we want to load. The middle player is a smart but death simple helper object EPPZViewInstantiator with the sole purpose of load a Nib file, and have a reference to a view in it. The third is a tiny UIView category.
UIImage from SpriteKit scene
Sometimes you find yourself in a situation, when you need to snapshot a UIImage from SpriteKit, to export into the Photo Library, or a thumbnail to show up somewhere, or probably more often a shot just to blur it while you overlay some transparent UIKit content on the top of it. I was just in such situation lately, and after some trial and error I ended up with a UIImage.
iOS 7 icon template using new UIBezierpath implementation
There are many iOS 7 icon template out there containing an approximate icon shape, but lately I found some clever explorings using that feels me as the closest match. iOS 7 icon template using new UIBezierpath implementation Check Mike Swanson’s Photoshop script that creates shapes, based on similar inspection to Manfred Schwind’s Exploring iOS 7 […]
5 approach to implement SpriteKit drag
Implementing SpriteKit drag could be tricky. On one hand you can find a running animation (I’m not sure that it is synced with UIKit touch events), on the other hand you (may) have a physics simulation to fit in.
iPhone Simulator Documents directory
As I actually always forget this, let me pin a reminder about where you can find the iPhone Simulator Documents directory. Anywhere in the Finder press then paste this directory into the Go to the folder: field. Path to the iPhone Simulator Documents directory ~/Library/Application Support/iPhone Simulator There you can find all the installed applications […]
Compile library to project folder
The easiest way I think is to copy the built executable to the project folder after compiler is done, not to messing up any other build settings. Just use some smart xCode build setting. show the folder where the latest executable have built. tells you the full name of the executable. Now you got what […]
Advanced yet simple way to save to NSUserDefaults
Storing user level application settings, UI states, generic counters in an iOS app is an everydayer. The usual – and told to be easiest – way is to store these values is save to . But it is not that fluent for everyday use as it should be. Normally you don’t want to declare each […]
The engine behind SpriteKit
I was just wondering what is the engine behind . Then I just wrecked up some instantiation, and realized that actually it is explicitly named in the body message of some exception it raised. Please find a definitive guide below to see it yourself. Anyway, you can see private iOS 7 framework – internal part […]