February 2012
1 post
objective-c singleton macro that supports both ARC...
Im a big fan of Matt Gallagher’s singleton macro and have been useing a slightly modified version of it by Oliver Jones.
Lately however I’ve been enabling ARC in my projects and came across the problem of including the macro only to have xcode winge to me about all the release methods. Im using a library so I wanted my macro to support both enviroments. I initially went back to...
November 2011
2 posts
3 tags
How to create a Tweet Sheet the correct way in iOS...
With the many new features introduced in iOS 5 I was particularly excited about the new Twitter.framework. Apple customers can now enjoy the pleasures of having their Twitter accounts baked right into the OS granting access to the twitter-verse from every nook and cranny in the device. While developers can now integrate twitter into their apps much faster and more easily than it has ever been...
3 tags
How to convert a html hex string into UIColor with...
Typically you should be using RGB (Red, Green, Blue) UIColor’s. However, every now and then you will need to create one from a HEX string. Probably from an API you have to deal with. None the less there is an ubundance of different methods you can use converting hex strings into UIColor objects. This is the solution I swear by and never had a problem with it thus far.
To get started,...
October 2011
1 post
1 tag
How to fix "this class is not key value...
If you ever come across this error:
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key ...'
It is likely you have either renamed an IBOutlet property or removed a nib (.xib) file associated with your class.
If you removed the nib and decided to go nibless you can fix this error by...
September 2011
5 posts
1 tag
Repair -weak_library /usr/lib/libSystem.B.dylib...
This week I was implementing Urban Airship into my application when i came across this weird behaviour. I followed the documentation and implemented all the steps only to find the application would crash with “EXEC_BAD_ACCESS” before if even finished loading. A little confused I tried to NSZombie the root of the cause however instruments wouldn’t attach to the target and I had to...
2 tags
New Badass Features in Visual Studio 11 for Front...
Microsoft Visual Studio is my primary weapon of choice for web development and the new set of features coming in the next edition can only be explained as badass!
The first thing you’re going to notice is you can now single click (highlight) files from the solution explorer to open them. Quickly traverse files with the up and down arrow keys and watch the contents of each file flash in...
1 tag
How to recursively copy files using MSBuild Copy...
Today I was faced with the problem of copying a set of files into a new location using a MSBuild task. Previously we got the job done using an xcopy command post build, while this was okay it’s not ideal for front end developers.
The problem is front end developers are constantly tweaking files usually followed by refreshing the website over and over. In my case today we where building...
2 tags
Tips for making jQuery selectors faster
Unfortunately jQuery selectors aren’t stupid proof. Its all too easy to chuck a long string of junk into your selector and not have a single problem. You might have the attitude of, “meh it works” and not give it any more thought of if there is a better way.
The upside of actually paying attention to your jQuery selectors is: the faster they execute the faster your page is going...
3 tags
A hitch hikers guide on how to improve jQuery...
I see all to often the simple mistakes developers make when coding with jQuery.
Hopefully these tips will appear simple to you and thats because they ARE. These basic changes to your coding habits will have drastic performance improvements to your jQuery.
Use the latest version of jQuery
If you’re too lazy to read past the first tip then this is for you (mr lazy developer).
Simply...