<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>objectivesnippets.com - latest snippets</title><link>http://objectivesnippets.com/</link><description>New code snippets, hot off the press!</description><atom:link href="http://objectivesnippets.com/snippets/feeds/latest/rss/" rel="self"></atom:link><language>en-GB</language><lastBuildDate>Wed, 26 Mar 2014 07:21:49 -0000</lastBuildDate><item><title>timesince category for NSDate</title><link>http://objectivesnippets.com/snippet/timesince-category-for-nsdate/</link><description>Compares an NSDate to the current date and gives the time delta as a human readable format.

e.g., 

[myDate timesince]
returns: 8 months, 1 week

or

[myDate timesinceWithDepth:3]
returns: 2 days, 14 hours, 1 min</description><guid>http://objectivesnippets.com/snippet/timesince-category-for-nsdate/</guid></item><item><title>NSNotificationCenter How-To</title><link>http://objectivesnippets.com/snippet/nsnotificationcenter-how-to/</link><description>A quick how-to on using NSNotificationCenter notifications in your app... this is mostly to serve as a reminder to always dealloc them!</description><guid>http://objectivesnippets.com/snippet/nsnotificationcenter-how-to/</guid></item><item><title>Test a string against a regular expression</title><link>http://objectivesnippets.com/snippet/test-a-string-against-a-regular-expression/</link><description>A basic example of regular expression testing against an NSString.</description><guid>http://objectivesnippets.com/snippet/test-a-string-against-a-regular-expression/</guid></item><item><title>Simple date / time formatting</title><link>http://objectivesnippets.com/snippet/simple-date-time-formatting/</link><description>Im just adding this here as a basic reminder of how to output the current date or time, using an NSDateFormatter. Just replace the timeFormatter for @&amp;quot;dd-MM-yyyy&amp;quot; to grab the date (for example)</description><guid>http://objectivesnippets.com/snippet/simple-date-time-formatting/</guid></item><item><title>Manually rotate a UIView</title><link>http://objectivesnippets.com/snippet/manually-rotate-a-uiview/</link><description>This will apply a rotation to a UIView, effectively changing the coordinate system within that view.

Useful for manually rotating the device:
  [UIApplication sharedApplication].statusBarOrientation = UIDeviceOrientationLandscapeLeft;
Then simply apply a transformation to your main window and everything inside will be rotated</description><guid>http://objectivesnippets.com/snippet/manually-rotate-a-uiview/</guid></item></channel></rss>