<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/objective-c/tags/objc</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sat, 25 May 2013 06:08:01 GMT</pubDate>
<item>
<title>(Objective C) Example from IVM-Awesomesauce - leftspin</title>
<link>http://snipplr.com/view/64702/example-from-ivmawesomesauce/</link>
<description><![CDATA[ <p>A snippet of code from IVM-Awesomesauce that shows how to use included classes to perform a custom animation between two UIViewControllers.</p> ]]></description>
<pubDate>Sun, 22 Apr 2012 07:41:34 GMT</pubDate>
<guid>http://snipplr.com/view/64702/example-from-ivmawesomesauce/</guid>
</item>
<item>
<title>(Objective C) Bring Application to Front - mirage3d</title>
<link>http://snipplr.com/view/61843/bring-application-to-front/</link>
<description><![CDATA[ <p>Bring an application to front to gain focus.</p> ]]></description>
<pubDate>Tue, 13 Dec 2011 18:36:24 GMT</pubDate>
<guid>http://snipplr.com/view/61843/bring-application-to-front/</guid>
</item>
<item>
<title>(Objective C) Quickest Way to Shell - Use system() instead of NSTask - zingo</title>
<link>http://snipplr.com/view/56345/quickest-way-to-shell--use-system-instead-of-nstask/</link>
<description><![CDATA[ <p>Cocoa provides NSTask to run subprocesses. It can be used to run shell scripts, but all this manual pipe and file handling is a bit cumbersome. Fortunately, for a simple script, we can use the trusty old system and redirect its result to a file.</p> ]]></description>
<pubDate>Sat, 09 Jul 2011 04:53:37 GMT</pubDate>
<guid>http://snipplr.com/view/56345/quickest-way-to-shell--use-system-instead-of-nstask/</guid>
</item>
<item>
<title>(Objective C) Checking If You App Has Been Run Before - zingo</title>
<link>http://snipplr.com/view/54411/checking-if-you-app-has-been-run-before/</link>
<description><![CDATA[ <p>Do you need you app to do something when it is first run on a certain computer? Do you need to know if it has been run before? Enter the following code into your Application Delegate.

This code creates a BOOL that is created when the app is run. The if-else statement reads the value of the BOOL -- Yes or No. NOTE: You'll notice that if you run the app from xcode with the run button it says "Not run before". When you run it again it still says that. In order to truly test locate you apps Debug .app application then run that. Xcode clears out the data when you run it again. IT DOES WORK though, so don't worry if running you app in Xcode still gives you the Not Run Before result.</p> ]]></description>
<pubDate>Thu, 26 May 2011 14:19:04 GMT</pubDate>
<guid>http://snipplr.com/view/54411/checking-if-you-app-has-been-run-before/</guid>
</item>
<item>
<title>(Objective C) Drawing Scaled Rectangles with NSDrawNinePartImage - zingo</title>
<link>http://snipplr.com/view/39335/drawing-scaled-rectangles-with-nsdrawninepartimage/</link>
<description><![CDATA[ <p>Drawing scaled rectangles of arbitrary width and height that keeps the corner and sides properly scaled while growing the center.</p> ]]></description>
<pubDate>Fri, 20 Aug 2010 08:22:46 GMT</pubDate>
<guid>http://snipplr.com/view/39335/drawing-scaled-rectangles-with-nsdrawninepartimage/</guid>
</item>
<item>
<title>(Objective C) How to Convert Degrees to Radians, Radians to Degrees - magicrebirth</title>
<link>http://snipplr.com/view/35729/how-to-convert-degrees-to-radians-radians-to-degrees/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 13 Jun 2010 18:17:43 GMT</pubDate>
<guid>http://snipplr.com/view/35729/how-to-convert-degrees-to-radians-radians-to-degrees/</guid>
</item>
<item>
<title>(Objective C) How do I launch a URL using Cocoa  (Objective C) - macosx.com - magicrebirth</title>
<link>http://snipplr.com/view/28212/how-do-i-launch-a-url-using-cocoa--objective-c--macosxcom/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 11 Feb 2010 22:07:27 GMT</pubDate>
<guid>http://snipplr.com/view/28212/how-do-i-launch-a-url-using-cocoa--objective-c--macosxcom/</guid>
</item>
<item>
<title>(Objective C) Sending emails from Cocoa - zingo</title>
<link>http://snipplr.com/view/26934/sending-emails-from-cocoa/</link>
<description><![CDATA[ <p>With 10.5 Apple deprecated the use of NSMailDelivery  – without a replacement. So the questions comes up regulary – how does one send emails from Cocoa? Turns out there are couple of frameworks available that can also be used to do the job.

* Pantomime  (LGPL license) - http://www.collaboration-world.com/pantomime/
* MailCore (New BSD license) - http://www.mronge.com/m/MailCore/
* EDMessage (BSD syle license) - http://www.mulle-kybernetik.com/software/EDFrameworks/download.html#EDMessage

EDMessage has been around for ages. Checkout the example on how to use the API. MailCore is also really easy to use. But both lack support for asynchronous mail delivery. With MailCore I couldn’t even work out how to send attachments. Also no idea if it’s getting developed anymore. So if you are OK to use a LGPL library Pantomime seemed like a good choice. Sending simple emails is quite straight forward.</p> ]]></description>
<pubDate>Sat, 23 Jan 2010 22:02:38 GMT</pubDate>
<guid>http://snipplr.com/view/26934/sending-emails-from-cocoa/</guid>
</item>
<item>
<title>(Objective C) Recursively list all files and directories below a given directory - fuzzylollipop</title>
<link>http://snipplr.com/view/23016/recursively-list-all-files-and-directories-below-a-given-directory/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 12 Nov 2009 12:04:22 GMT</pubDate>
<guid>http://snipplr.com/view/23016/recursively-list-all-files-and-directories-below-a-given-directory/</guid>
</item>
<item>
<title>(Objective C) Detailed NSLog() via a Preprocessor Macro - zingo</title>
<link>http://snipplr.com/view/21528/detailed-nslog-via-a-preprocessor-macro/</link>
<description><![CDATA[ <p>Ever needed to see more context surrounding your NSLog statement to help you debug in the console?</p> ]]></description>
<pubDate>Tue, 20 Oct 2009 22:51:49 GMT</pubDate>
<guid>http://snipplr.com/view/21528/detailed-nslog-via-a-preprocessor-macro/</guid>
</item>
<item>
<title>(Objective C) MD5 String Hash - phifty</title>
<link>http://snipplr.com/view/18192/md5-string-hash/</link>
<description><![CDATA[ <p>This is a simple md5 implementation.</p> ]]></description>
<pubDate>Tue, 11 Aug 2009 22:13:44 GMT</pubDate>
<guid>http://snipplr.com/view/18192/md5-string-hash/</guid>
</item>
<item>
<title>(Objective C) UIView and Subviews Exploded - phifty</title>
<link>http://snipplr.com/view/18191/uiview-and-subviews-exploded/</link>
<description><![CDATA[ <p>This is adapted from Erica Sadun's explode code in her book "iPhone Developer's Cookbook".
It takes any UIView-based element and exposes all of the subviews and their subviews, etc.
Its a good way to dig into UIKit elements as well as debug your own UIView-based code.
In code, always set level to zero.</p> ]]></description>
<pubDate>Tue, 11 Aug 2009 22:04:04 GMT</pubDate>
<guid>http://snipplr.com/view/18191/uiview-and-subviews-exploded/</guid>
</item>
<item>
<title>(Objective C) Lite KVC Wrapper - phifty</title>
<link>http://snipplr.com/view/18190/lite-kvc-wrapper/</link>
<description><![CDATA[ <p>This is a wrapper for objects that use Key-Value Coding (KVC) in Objective-C.  An appropriate use would be for business objects whose state changes throughout the life of the application session.</p> ]]></description>
<pubDate>Tue, 11 Aug 2009 21:54:46 GMT</pubDate>
<guid>http://snipplr.com/view/18190/lite-kvc-wrapper/</guid>
</item>
<item>
<title>(Objective C) NSString Contains String Additions - iloveitaly</title>
<link>http://snipplr.com/view/17768/nsstring-contains-string-additions/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 01 Aug 2009 14:46:42 GMT</pubDate>
<guid>http://snipplr.com/view/17768/nsstring-contains-string-additions/</guid>
</item>
<item>
<title>(Objective C) Simple alert box on iPhone - steve918</title>
<link>http://snipplr.com/view/11926/simple-alert-box-on-iphone/</link>
<description><![CDATA[ <p>Display simple alert box</p> ]]></description>
<pubDate>Fri, 06 Feb 2009 16:37:32 GMT</pubDate>
<guid>http://snipplr.com/view/11926/simple-alert-box-on-iphone/</guid>
</item>
<item>
<title>(Objective C) Toggle iPhone network indicator in status bar - steve918</title>
<link>http://snipplr.com/view/11925/toggle-iphone-network-indicator-in-status-bar/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 06 Feb 2009 16:35:14 GMT</pubDate>
<guid>http://snipplr.com/view/11925/toggle-iphone-network-indicator-in-status-bar/</guid>
</item>
<item>
<title>(Objective C) Show/Hide iPhone Status Bar - steve918</title>
<link>http://snipplr.com/view/11924/showhide-iphone-status-bar/</link>
<description><![CDATA[ <p>Allows you to toggle visibility of the iPhone status bar at the top of the screen that shows the carrier information, network status and time</p> ]]></description>
<pubDate>Fri, 06 Feb 2009 16:34:04 GMT</pubDate>
<guid>http://snipplr.com/view/11924/showhide-iphone-status-bar/</guid>
</item>
<item>
<title>(Objective C) Check Network Connection with SCNetworkCheckReachabilityByName - warhero</title>
<link>http://snipplr.com/view/10696/check-network-connection-with-scnetworkcheckreachabilitybyname/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 26 Dec 2008 02:53:13 GMT</pubDate>
<guid>http://snipplr.com/view/10696/check-network-connection-with-scnetworkcheckreachabilitybyname/</guid>
</item>
<item>
<title>(Objective C) Parse Header File for Outlets and makes sure that they are set at Runtime - zingo</title>
<link>http://snipplr.com/view/8642/parse-header-file-for-outlets-and-makes-sure-that-they-are-set-at-runtime/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 26 Sep 2008 20:33:33 GMT</pubDate>
<guid>http://snipplr.com/view/8642/parse-header-file-for-outlets-and-makes-sure-that-they-are-set-at-runtime/</guid>
</item>
<item>
<title>(Objective C) Kill App after Expire Date (Suicidal Code Redux) - zingo</title>
<link>http://snipplr.com/view/7196/kill-app-after-expire-date-suicidal-code-redux/</link>
<description><![CDATA[ <p>Using a gcc predefined macro, __DATE__, the code can know for itself when it was compiled, and build in an expiration date based on that value.

The former code (http://snipplr.com/view/3448/kill-app-after-expire-date/) was not internationalised and might cause an issue when run outside of English speaking countries. This code resolves the locale issue.</p> ]]></description>
<pubDate>Wed, 09 Jul 2008 22:39:05 GMT</pubDate>
<guid>http://snipplr.com/view/7196/kill-app-after-expire-date-suicidal-code-redux/</guid>
</item>
</channel>
</rss>