<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>egocode</title><generator>Tumblr (3.0; @egocode)</generator><link>http://egoco.de/</link><item><title>EGOCache 2.0</title><description>&lt;p&gt;It&amp;#8217;s been a while since we&amp;#8217;ve updated &lt;a href="https://github.com/enormego/EGOCache"&gt;EGOCache&lt;/a&gt;, a large reason for that is that it&amp;#8217;s been fairly stable and gets the job done.  There&amp;#8217;s not too many bells and whistles you can build into a key value cache store, at least not many that are necessary, so we&amp;#8217;ve left things largely alone.  Aside from a few pull requests, not much has changed in EGOCache since we released in October 2009.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So, what&amp;#8217;s new in 2.0? Everything. Nothing.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Internally, 2.0 is completely rearchitectured/rewritten.  Externally, the API remains largely untouched, so you&amp;#8217;ll be able to drop it into your existing projects and go.&lt;/p&gt;
&lt;p&gt;The only major API change is that +currentCache has been deprecated in favor of +globalCache.  This was made purely for semantics, because you can now instantiate your own EGOCache instances and set a different cache directory if you&amp;#8217;d like.  This could be useful if you&amp;#8217;d like to divide caches for different items (photos vs UI caching).&lt;/p&gt;
&lt;p&gt;Under the hood is where all the fun stuff c:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;EGOCache 2.0 is now built entirely on ARC, Objective-C blocks and libdispatch.  If your projects don&amp;#8217;t support these technologies, well, do yourself a favor, learn them and love them.  We were resistant to ARC at first too, just give in ;).&lt;/li&gt;
&lt;li&gt;All disk saves are now non blocking and processed in a separate dispatch queue.&lt;/li&gt;
&lt;li&gt;The thread saftey issues that popped up over the last year should be resolved.  All dictionary modifications are now done in a serial dispatch queue.&lt;/li&gt;
&lt;li&gt;On iOS, when saving a UIImage, EGOCache now serializes the UIImage instance rather than the old way of using UIImagePNGRepresentation.  This allows you to retain all meta information associated with the object, such as orientation and scale.  An additional benefit to this is that the image is saved in it&amp;#8217;s original format, so JPEG&amp;#8217;s are no longer bloated to PNG size when saved.  One downside to this, if for some reason you were retrieving images via -dataForKey:, that will no longer work.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;This is absolutely NOT a beta release.  We&amp;#8217;ve been shipping this code on App Store since August and it&amp;#8217;s running on millions of devices, so feel confident in switching to it from 1.0.&lt;/p&gt;
&lt;p&gt;Grab the code here: &lt;a href="https://github.com/enormego/EGOCache"&gt;&lt;a href="https://github.com/enormego/EGOCache"&gt;https://github.com/enormego/EGOCache&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lastly, I wanted to add a quick update on the rest of our open source libraries:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We still use them, every day.  We&amp;#8217;ve been evolving them over the years and they&amp;#8217;re all rewritten to utilize the same technologies mentioned above, and will be updated soon.  We don&amp;#8217;t take major updates lightly, and we&amp;#8217;re not going to put them out there until we&amp;#8217;ve already shipped them in our own apps and know for certain they&amp;#8217;re rock solid.  Look for EGOHTTPRequest 2.0 in the next few weeks.&lt;/p&gt;</description><link>http://egoco.de/post/34853895060</link><guid>http://egoco.de/post/34853895060</guid><pubDate>Fri, 02 Nov 2012 17:48:52 -0400</pubDate><dc:creator>shnhrrsn</dc:creator></item><item><title>Installing ImageMagick for PHP and MAMP</title><description>&lt;p&gt;&lt;ol&gt;&lt;li&gt;Install Brew (&lt;a href="https://github.com/mxcl/homebrew/wiki/installation"&gt;https://github.com/mxcl/homebrew/wiki/installation&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;In Terminal, run: &lt;strong&gt;brew install imagemagick&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;In Terminal, run: &lt;strong&gt;brew tap josegonzalez/homebrew-php&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;In Terminal, run:&lt;strong&gt; brew install imagick-php&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Copy the compiled extension path (extension= &amp;#8230;)&lt;/li&gt;
&lt;li&gt;Edit this file: &lt;strong&gt;/Applications/MAMP/Library/bin/envvars&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Comment out the only lines that aren&amp;#8217;t already commented out.&lt;/li&gt;
&lt;li&gt;Add the extension= path to your php.ini files.&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;&lt;strong&gt;MAMP Users:&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;/Applications/MAMP/bin/php/php5.3.6/conf&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;   &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;MAMP Pro Users: &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;/Applications/MAMP/bin/php/php5.3.6/conf&lt;br/&gt;/Library/Application Support/appsolute/MAMP PRO/conf/php.ini&lt;br/&gt;And MAMP PRO &amp;gt; File &amp;gt; Edit Template &amp;gt; PHP &amp;gt; SELECT YOUR VERSION&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;    &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Everyone Else:&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;In Terminal, run: &lt;strong&gt;php -i | grep php.ini$&lt;/strong&gt; to find the location of your .ini file.&lt;/div&gt;
&lt;div&gt;Restart Apache via MAMP.&lt;/div&gt;&lt;/p&gt;</description><link>http://egoco.de/post/23167969231</link><guid>http://egoco.de/post/23167969231</guid><pubDate>Wed, 16 May 2012 11:46:00 -0400</pubDate><category>php</category><category>mamp</category><category>saverio</category><category>imagemagick</category><dc:creator>saverio</dc:creator></item><item><title>Calculating the height of text in Android</title><description>&lt;p&gt;While Android has numerous methods for sizing text, as far as I can see, none of them let you pass in a max width to get the height of the text once it wraps.&lt;/p&gt;
&lt;p&gt;This is relatively simple to do on iOS via &lt;a href="https://developer.apple.com/library/ios/documentation/uikit/reference/NSString_UIKit_Additions/Reference/Reference.html#//apple_ref/occ/instm/NSString/sizeWithFont:constrainedToSize:lineBreakMode:"&gt;– sizeWithFont:constrainedToSize:lineBreakMode:&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For Android, I came up with the following convenience method to do it:&lt;/p&gt;
&lt;script src="https://gist.github.com/1950643.js?file=GetTextHeight.java" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;With this, you can just do &lt;code&gt;int height = getTextHeight("text", 160, 12.0f, Typeface.DEFAULT_BOLD);&lt;/code&gt;  and you&amp;#8217;re set.&lt;/p&gt;</description><link>http://egoco.de/post/19077604048</link><guid>http://egoco.de/post/19077604048</guid><pubDate>Thu, 01 Mar 2012 10:51:36 -0500</pubDate><category>android</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>Android Hardware Acceleration Bug: canvas.drawBitmap NullPointerException</title><description>&lt;p&gt;Despite what &lt;a href="http://code.google.com/p/android/issues/detail?id=21364"&gt;Google says&lt;/a&gt;, there&amp;#8217;s still a bug in the Android SDK when doing the following:&lt;/p&gt;
&lt;script src="https://gist.github.com/2013200.js?file=gistfile1.java" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;As per the Android docs, the second parameter is supposed to accept null.  Passing in null works fine on devices without hardware acceleration, but will result in a crash if the device has HA.  Google claims this bug was resolved in ICS, but it&amp;#8217;s definitely still present as of today.&lt;/p&gt;
&lt;p&gt;As long as you provide the src rect, everything works fine:&lt;/p&gt;
&lt;script src="https://gist.github.com/2013205.js?file=gistfile1.java" type="text/javascript"&gt;&lt;/script&gt;</description><link>http://egoco.de/post/19076636515</link><guid>http://egoco.de/post/19076636515</guid><pubDate>Mon, 30 Jan 2012 16:08:00 -0500</pubDate><category>android</category><category>ics</category><category>npe</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>Webkit box-shadow inconsistencies</title><description>&lt;p&gt;There appears to be an inconsistency in how Webkit renders the CSS3 &amp;#8220;&lt;code&gt;box-shadow&lt;/code&gt;&amp;#8221; tag depending on whether or not you prefix with &amp;#8220;&lt;code&gt;-webkit&lt;/code&gt;&amp;#8221;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://twitter.com/barkerja_"&gt;John Barker&lt;/a&gt; brought this to my attention while working on something for Fav.tv so I began to investiate, and sure enough, it&amp;#8217;s true:&lt;/p&gt;
&lt;p&gt;&lt;img height="290" src="http://f.cl.ly/items/1g0q2t3X1S0d2N0f2i3w/Picture%202012-03-10%20at%203.52.03%20PM.png" width="453"/&gt;&lt;/p&gt;
&lt;p&gt;You can find the code/working example here: &lt;a href="http://jsfiddle.net/AK5Pt/2/"&gt;&lt;a href="http://jsfiddle.net/AK5Pt/2/"&gt;http://jsfiddle.net/AK5Pt/2/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://egoco.de/post/19076168568</link><guid>http://egoco.de/post/19076168568</guid><pubDate>Tue, 17 Jan 2012 20:59:00 -0500</pubDate><category>css3</category><category>webkit</category><category>boxshadow</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>CSS3 Horizontal Navigation</title><description>&lt;p&gt;&lt;img align="right" height="215" src="http://f.cl.ly/items/0g2u362M1m171w0p0A0d/Picture%202012-03-10%20at%203.43.33%20PM.png" width="295"/&gt;&lt;/p&gt;
&lt;p&gt;Example of a pretty simple horizontal menu with vertical texted, purely powered by HTML and CSS3.&lt;/p&gt;
&lt;p&gt;Head over to jsfiddle to see a working example and view the code: &lt;a href="http://jsfiddle.net/qSzMa/4/"&gt;jsfiddle.net/qSzMa/4/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note: This only contains the &lt;code&gt;-webkit&lt;/code&gt; css prefixes, you&amp;#8217;ll need to update with &lt;code&gt;-moz&lt;/code&gt;, &lt;code&gt;-ms&lt;/code&gt;, etc for production use.&lt;/p&gt;</description><link>http://egoco.de/post/19075620971</link><guid>http://egoco.de/post/19075620971</guid><pubDate>Fri, 23 Dec 2011 12:42:00 -0500</pubDate><category>css3</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>"EGO" Xcode Theme for Xcode 4 + EGOv2</title><description>&lt;p&gt;Almost &lt;a href="http://egoco.de/post/19071893943/xcode-ego-theme"&gt;two years ago&lt;/a&gt; now, we posted our Xcode theme, &amp;#8220;EGO&amp;#8221;.  It&amp;#8217;s been significantly more popular than I ever thought, we&amp;#8217;ve seen a lot tweets about, we&amp;#8217;ve seen it in screen casts, and it even &lt;a href="http://www.robocatapps.com/blog/video-launching-outside/"&gt;made an appearance&lt;/a&gt; in the product launch video for robotcat&amp;#8217;s Outside app.  There&amp;#8217;s no real metric for these things, but it seems to be one of the more popular third party Xcode things (we&amp;#8217;re number one in Google!).&lt;/p&gt;
&lt;p&gt;So, with the GM release of Xcode 4&lt;em&gt;,&lt;/em&gt; we&amp;#8217;ve gone ahead and ported our original EGO theme to the new Xcode 4 file format.&lt;/p&gt;
&lt;p&gt;We&amp;#8217;re also posting a new version of EGO, EGOv2.  It&amp;#8217;s based on EGO but has some key differences: New background color, new comment colors, themed console, and other minor tweaks and slight HSB adjustments.  Here&amp;#8217;s a comparison:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Original EGO Theme&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://shn.to/3A092r3P3b1H170w2w3k"&gt;&lt;img alt="" src="http://cl.ly/3A092r3P3b1H170w2w3k/Screen_shot_2011-02-04_at_12.36.37_PM.png" width="280"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New EGOv2 Theme&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://shn.to/302O3x1e3U262F2N2Y1e"&gt;&lt;img alt="" src="http://cl.ly/302O3x1e3U262F2N2Y1e/Screen_shot_2011-02-04_at_12.36.06_PM.png" width="280"/&gt;&lt;/a&gt;&lt;strong&gt;&lt;br/&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To install the themes, run the following blocks of code in Terminal:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Original EGO&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;code class="block"&gt;mkdir -p ~/Library/Developer/Xcode/UserData/FontAndColorThemes; cd ~/Library/Developer/Xcode/UserData/FontAndColorThemes; curl -O &lt;a href="http://assets.egoco.de/egotheme/EGO.dvtcolortheme"&gt;http://assets.egoco.de/egotheme/EGO.dvtcolortheme&lt;/a&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New EGOv2&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;code class="block"&gt;mkdir -p ~/Library/Developer/Xcode/UserData/FontAndColorThemes; cd ~/Library/Developer/Xcode/UserData/FontAndColorThemes; curl -O &lt;a href="http://assets.egoco.de/egotheme/EGOv2.dvtcolortheme"&gt;http://assets.egoco.de/egotheme/EGOv2.dvtcolortheme&lt;/a&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now just restart Xcode, go to Preferences &amp;gt; Fonts &amp;amp; Colors, and select &amp;#8220;EGO&amp;#8221; or &amp;#8220;EGOv2&amp;#8221; from the color theme drop down.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: Both themes now use Menlo Bold 13pt.  This might not be for everyone, but I&amp;#8217;ve found it much easier on the eyes and the bold seems to render nicer than regular, to me.  Feel free to change!&lt;/em&gt;&lt;/p&gt;</description><link>http://egoco.de/post/19075121152</link><guid>http://egoco.de/post/19075121152</guid><pubDate>Fri, 04 Feb 2011 18:46:00 -0500</pubDate><category>xcode</category><category>egotheme</category><category>egov2</category><category>themes</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>Safari View Source in TextMate</title><description>&lt;p&gt;&lt;img align="right" height="261" src="http://f.cl.ly/items/0b322K0V2J2H3e2S2L3L/Screen%20shot%202010-11-20%20at%2010.04.36%20PM.png" width="241"/&gt;While I love developing in &lt;strong&gt;Safari&lt;/strong&gt; over alternatives like &lt;strong&gt;Firefox&lt;/strong&gt; and &lt;strong&gt;Chrome&lt;/strong&gt;, it lacks in one particular area: View Source.  Safari&amp;#8217;s View Source is practically useless, it doesn&amp;#8217;t show line numbers, no syntax highlighting, etc.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Safari&lt;/strong&gt; does offer the Web Inspect, which is nice, but a little annoying for quick look ups since everything is broken down into the DOM tree.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve seen other Safari Extension&amp;#8217;s like BetterSource that do this right in the browser, but really, why re-invent the wheel?  TextMate is an awesome editor (albeit with this issues) and would be perfect for this.&lt;/p&gt;
&lt;p&gt;I decided to see if I could get a &amp;#8220;View Source in TextMate&amp;#8221; item in the contextual menu.  After reading over all of the docs, it became apparent to me that opening files in a native app just wasn&amp;#8217;t going to happen.&lt;/p&gt;
&lt;p&gt;I was able to get it to work by writing a TextMate plugin to handle the heavy lifting via it&amp;#8217;s txmt:// URL scheme.  So it all worked out in the end, you&amp;#8217;ll just need to install the TextMate plugin as well as the Safari extension. Â Enjoy!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://assets.egoco.de/viewsourceintextmate/ViewSourceInTextMate.tmplugin.zip"&gt;Download the ViewSourceInTextMate TextMate Plugin&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://assets.egoco.de/viewsourceintextmate/ViewSourceInTextMate.safariextz"&gt;Download the ViewSourceInTextMate Safari Extension&lt;/a&gt;&lt;/p&gt;</description><link>http://egoco.de/post/19075003025</link><guid>http://egoco.de/post/19075003025</guid><pubDate>Sun, 21 Nov 2010 04:10:04 -0500</pubDate><category>safari</category><category>textmate</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>Facebook Redux: Who doesn't love a happy ending?</title><description>&lt;p&gt;&lt;a href="http://github.com/facebook/three20/commit/204673eea141acf4ee5f05402db6051dafcc8b17" target="_blank"&gt;&lt;img align="right" height="240" src="http://cdn.egoco.de.s3.amazonaws.com/old/screenshot_4mx7_JLMN.png" width="323"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Late last week, we had a bit of a &lt;a href="http://egoco.de/post/19074582075/what-ever-happened-to-common-courtesy" target="_blank"&gt;misunderstanding with Facebook&lt;/a&gt;. We probably jumped the gun and ended up rendering the title of the post a bit hypocritical, as many of you pointed out. We should have reached out to Facebook first to find out how this happened, but we were pissed off and wanted to tell the world. It&amp;#8217;s not easy to get in touch with Facebook, and we were in no mood to sift through their site to figure it out. Apparently, we could have emailed them at &lt;a href="mailto:opensource@facebook.com"&gt;opensource@facebook.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As it turns out, Facebook didn&amp;#8217;t even know they did anything wrong. &lt;a href="http://github.com/enormego/EGOTableViewPullRefresh"&gt;EGOTableViewPullRefresh&lt;/a&gt; made it&amp;#8217;s way into Three20 by way of a fork merge from a third party. This obviously doesn&amp;#8217;t excuse Facebook, since they are responsible for their repository, but it does explain how it happened.&lt;/p&gt;
&lt;p&gt;Within hours of our post going up, Jeff and David from Facebook&amp;#8217;s Open Source team became aware of the mix up and reached out to us &lt;a href="http://github.com/facebook/three20/commit/204673eea141acf4ee5f05402db6051dafcc8b17"&gt;resolved the issue&lt;/a&gt; quickly. All in all, we were pretty happy with the resolution. We received credit for our code in three20, and we helped make Facebook&amp;#8217;s iPhone app just a little bit better.&lt;/p&gt;
&lt;p&gt;Facebook didn&amp;#8217;t stop there though, David reached out to me again this week and send me a Facebook Swag Pack:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://cdn.egoco.de.s3.amazonaws.com/old/hh6_xN3P.png" target="_blank"&gt;&lt;img alt="" height="289" src="http://cdn.egoco.de.s3.amazonaws.com/old/hh6_xN3P.png" width="400"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;At the end of the day, Facebook screwed up, but did everything right to resolve it, and then went beyond that by sending us from free Facebook swag.  We&amp;#8217;re definitely sorry for how we initially handled this situation as well, since it&amp;#8217;s clear now we could have avoided this by simply getting in touch with Facebook right away.&lt;/p&gt;
&lt;p&gt;So thank you Facebook, you guys definitely have common courtesy!&lt;/p&gt;</description><link>http://egoco.de/post/19074784982</link><guid>http://egoco.de/post/19074784982</guid><pubDate>Sat, 28 Aug 2010 19:31:27 -0400</pubDate><category>facebook</category><category>egotableviewpullrefresh</category><category>pulltorefresh</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>What ever happened to common courtesy?</title><description>&lt;p&gt;&lt;img align="right" alt="Pull-to-Refresh is powered by Facebook's three20 library, taken directly from our EGOTableViewPullRefresh library, without any attribution." height="244" src="http://cdn.egoco.de.s3.amazonaws.com/old/facebook_6fRe.png" width="240"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Updated 8:30PM — See below&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Upon updating Facebook&amp;#8217;s iPhone app last night, the first thing I immediately noticed was &lt;strong&gt;Pull to Refresh&lt;/strong&gt;, the awesome UI Element created by &lt;a href="http://twitter.com/atebits" target="_blank"&gt;Loren Brichter&lt;/a&gt; for Tweetie 2. We fell in love with this element the second Tweetie 2 hit app store, so we re-created it and &lt;a href="http://github.com/enormego/EGOTableViewPullRefresh" target="_blank"&gt;open sourced&lt;/a&gt; it for everyone to use.&lt;/p&gt;
&lt;p&gt;We&amp;#8217;ve seen &lt;strong&gt;Pull to Refresh&lt;/strong&gt; used in a few apps before and always wondered whether or not it was the one we created, but never one as popular as Facebook. I immediately started looking to see if our code made it into their app, it would be awesome to see Facebook using something we wrote.&lt;/p&gt;
&lt;p&gt;I was a little disappointed when I found out this element was actually apart of their open source iOS library &lt;a href="http://github.com/facebook/three20" target="_blank"&gt;three20&lt;/a&gt;. Still, I was curious as to how they did it. Was it similar to what we came up? Was it better? We were never fully happy with our implementation, but never had the time to spend on making it better.&lt;/p&gt;
&lt;p&gt;Digging through their source code, I finally found the class: &lt;a href="http://github.com/facebook/three20/blob/master/src/Three20UI/Sources/TTTableHeaderDragRefreshView.m" target="_blank"&gt;TTTableHeaderDragRefreshView&lt;/a&gt;. I started looking over to code to see how they accomplished it, and that&amp;#8217;s when I realized it: &lt;em&gt;this was our class&lt;/em&gt;. You can see a diff on the two classes init methods below:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://cdn.egoco.de.s3.amazonaws.com/old/diff_5xKD.png" target="_blank"&gt;&lt;img alt="" src="http://cdn.egoco.de.s3.amazonaws.com/old/diff_thumb_kERz.png"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;em&gt;Note: For the purposes of the &lt;a href="http://www.kaleidoscopeapp.com/" target="_blank"&gt;diff tool&lt;/a&gt;, I normalized the code blocks a bit, but you can compare for yourself by going &lt;a href="http://github.com/facebook/three20/blob/master/src/Three20UI/Sources/TTTableHeaderDragRefreshView.m" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://github.com/enormego/EGOTableViewPullRefresh/blob/master/EGOTableViewPullRefresh/Classes/View/EGORefreshTableHeaderView.m" target="_blank"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Facebook prefixed some variables, slapped their Three20 branding on it, restructured some code, but it was the same code we wrote. The same code we wrote, with zero mention of us.&lt;/p&gt;
&lt;p&gt;Just like all of our open source code (&lt;a href="http://github.com/enormego" target="_blank"&gt;and we&amp;#8217;ve published a lot of it&lt;/a&gt;), our intent is always for it to be used to help developers and generally make apps/app store a better place for everyone. We were ecstatic that we might have made Facebook just a little bit better.&lt;/p&gt;
&lt;p&gt;To find out that they took our code, re-released it as their own, and take credit for it though? That&amp;#8217;s not cool Facebook. Not cool at all. It also violates our license, which states they need to retain our copyright notice when republishing it.&lt;/p&gt;
&lt;p&gt;Still, we&amp;#8217;re glad we could help made Facebook, three20, and all of the apps using pull to refresh in three20, better. It just would have been nice to get at least a hat tip from Facebook.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update 8:30pm:&lt;/strong&gt; Facebook reached out to us and they&amp;#8217;ve &lt;a href="http://github.com/facebook/three20/commit/204673eea141acf4ee5f05402db6051dafcc8b17" target="_blank"&gt;updated their headers&lt;/a&gt; to attribute the source code to us.&lt;/em&gt;&lt;/p&gt;</description><link>http://egoco.de/post/19074582075</link><guid>http://egoco.de/post/19074582075</guid><pubDate>Thu, 19 Aug 2010 20:17:32 -0400</pubDate><category>facebook</category><category>egotableviewpullrefresh</category><category>pulltorefresh</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>How to Add Those @2x iOS4 Resources to SVN</title><description>&lt;p&gt;In order for your app to take full advantage of the &lt;a href="http://www.apple.com/iphone/features/retina-display.html"&gt;iPhone 4 Retina Display&lt;/a&gt;, you&amp;#8217;ll need to add 2x resources to your iPhone project.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re using SVN to manage your files, you&amp;#8217;ll be faced with something pretty annoying:&lt;/p&gt;
&lt;p&gt;&lt;code class="block"&gt;$ svn add Default@2x.png&lt;br/&gt; svn: warning: 'Default' not found&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This was incredibly frustrating for me, no matter how I tried to escape it: single quotes, double quotes, backslashes, etc. SVN refused to add.&lt;/p&gt;
&lt;p&gt;This is due to internal path recognizers in SVN. It expects the last at symbol to specify a revision. This is easily corrected by adding an at symbol to the end of your file:&lt;/p&gt;
&lt;p&gt;&lt;code class="block"&gt;$ svn add Default@2x.png@&lt;br/&gt; A (bin) Default@2x.png&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You&amp;#8217;ll still need to manually add each resource, but it&amp;#8217;s better than nothing. You could also use an IDE like Cornerstone, but I prefer the SVN CLI way of managing SVN. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Before anyone says anything: I know this isn&amp;#8217;t an issue in GIT. GIT&amp;#8217;s awesome, I love GIT. Unfortunately I still have some projects that require SVN.&lt;/em&gt;&lt;/p&gt;</description><link>http://egoco.de/post/19074318299</link><guid>http://egoco.de/post/19074318299</guid><pubDate>Wed, 16 Jun 2010 17:25:00 -0400</pubDate><category>svn</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>What if images on the iPhone were as easy as HTML?</title><description>&lt;p&gt;HTML is great, you want to set an image and you do &lt;em&gt;&amp;lt;img src=&amp;#8221;http://example.com/image.jpg&amp;#8221; /&amp;gt;&lt;/em&gt;. It does everything else for you, it caches, it even loads in the background. This is something that is taken completely for granted until you actually have to do it yourself.&lt;/p&gt;
&lt;p&gt;The work involved in doing this on the iPhone is a pain. It&amp;#8217;s not so bad if you&amp;#8217;re viewing a single image, but if you&amp;#8217;re displaying web-based images in a table view? Ugh.&lt;/p&gt;
&lt;p&gt;Enter &lt;strong&gt;EGOImageLoading&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;We created &lt;strong&gt;EGOImageLoading&lt;/strong&gt; to be as easy to use as HTML. &lt;strong&gt;EGOImageLoading&lt;/strong&gt; is a few classes to make life easier on the developer, and to give the end user a much smoother result, easily.&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s what &lt;strong&gt;EGOImageLoading&lt;/strong&gt; does:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;It loads the image in the background&lt;/li&gt;
&lt;li&gt;It caches the image to the disk for you&lt;/li&gt;
&lt;li&gt;It allows you to set a placeholder image while it&amp;#8217;s loading&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;And here&amp;#8217;s where it gets even more awesome: &lt;strong&gt;It changes loading priorities on the fly&lt;/strong&gt;. If the user scrolls a bit in the table view, it&amp;#8217;ll decrease the priority of those images, and load the ones they&amp;#8217;re looking at right now, first.&lt;/p&gt;
&lt;p&gt;So how simple is this? You can jump to our &lt;a href="http://github.com/enormego/EGOImageLoading"&gt;GitHub&lt;/a&gt; page and grab the demo, but here&amp;#8217;s what our UITableViewCell subclass looks like:&lt;/p&gt;
&lt;script src="https://gist.github.com/2012947.js?file=gistfile1.m" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;Yeah, it really is that simple.&lt;/p&gt;
&lt;p&gt;So how does it work?&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s all based on &lt;strong&gt;EGOImageLoader&lt;/strong&gt; and &lt;strong&gt;EGOCache&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;We published &lt;strong&gt;EGOCache&lt;/strong&gt; a few months ago, and we&amp;#8217;ve since improved it to work better with &lt;strong&gt;EGOImageLoader&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EGOImageLoader&lt;/strong&gt; does all the heavy lifting. It checks to see if the image is cached, if it is, you get it right away. If not, it loads it up in the background, and if it&amp;#8217;s told to, it decreases the priorities and bumps new loads to the top.&lt;/p&gt;
&lt;p&gt;You can use &lt;strong&gt;EGOImageLoader&lt;/strong&gt; without table views, and it&amp;#8217;ll work great. However, this post is all about table views, so we created UIImageView and UIButton subclasses, &lt;strong&gt;EGOImageView&lt;/strong&gt; and &lt;strong&gt;EGOButton&lt;/strong&gt; respectively, that interact with &lt;strong&gt;EGOImageLoader&lt;/strong&gt; for you. That means all you have to do is initialize them, and set the URL. Seriously, that&amp;#8217;s it.&lt;/p&gt;
&lt;p&gt;They both contain &amp;#8220;&lt;em&gt;increaseImageLoadPriority&lt;/em&gt;&amp;#8221; and &amp;#8220;&lt;em&gt;decreaseImageLoadPriority&lt;/em&gt;&amp;#8221;.&lt;/p&gt;
&lt;p&gt;You&amp;#8217;ll probably never need to increase priority, since it does that for you when it loads (or re-sets a loading URL). However, you are going to want to decrease the load priority once the table view cell is moved off screen, we do this in the above example by tracking willMoveToSuperview.&lt;/p&gt;
&lt;p&gt;So there you have it, image loading on the iPhone, that&amp;#8217;s just as easy as throwing in an HTML image tag.&lt;/p&gt;
&lt;p&gt;You can grab &lt;strong&gt;EGOImageLoading&lt;/strong&gt; on it&amp;#8217;s GitHub page: &lt;a href="http://github.com/enormego/EGOImageLoading"&gt;&lt;a href="http://github.com/enormego/EGOImageLoading"&gt;http://github.com/enormego/EGOImageLoading&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strike&gt;Also a quick note, &lt;strong&gt;EGOImageLoader&lt;/strong&gt; is powered by the awesome &lt;a href="http://allseeing-i.com/ASIHTTPRequest/"&gt;ASIHTTPRequest&lt;/a&gt; class by &lt;a href="http://twitter.com/pokeb"&gt;Ben Copsey&lt;/a&gt;. I&amp;#8217;m sure you could rework it to work with NSURLConnection, but why? &lt;a href="http://allseeing-i.com/ASIHTTPRequest/"&gt;ASIHTTPRequest&lt;/a&gt; is amazing. If you&amp;#8217;re not using it, you should be.&lt;/strike&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update:&lt;/strong&gt; When EGOImageLoading was first released, ASIHTTPRequest was a small, light weight class and the above was true.  As ASIHTTPRequest grew it become increasingly bloated and unnecessary for most HTTP requests.  EGOImageLoader is now powered by NSURLConnection.&lt;/em&gt;&lt;/p&gt;</description><link>http://egoco.de/post/19074160631</link><guid>http://egoco.de/post/19074160631</guid><pubDate>Mon, 19 Oct 2009 22:53:00 -0400</pubDate><category>objective-c</category><category>egoimageloader</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>Using MapKit to create Map thumbnails</title><description>&lt;p&gt;The snippet of code below will give you a 64x64px view of a map thumbnail.  This creates a similar effect to the thumbnails used in the Maps app when you click into a location on the map.&lt;/p&gt;
&lt;script src="https://gist.github.com/2012923.js?file=gistfile1.m" type="text/javascript"&gt;&lt;/script&gt;</description><link>http://egoco.de/post/19073854530</link><guid>http://egoco.de/post/19073854530</guid><pubDate>Mon, 17 Aug 2009 16:25:51 -0400</pubDate><category>objective-c</category><category>mapkit</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>EGOCache: Objective-C Image/String/Data Caching</title><description>&lt;p&gt;&lt;strong&gt;EGOCache&lt;/strong&gt; is a pretty simple caching class for Objective-C that&amp;#8217;ll let you cache data for a certain period of time.  It&amp;#8217;s designed to work on the iPhone, so the paths reflect that.&lt;/p&gt;
&lt;p&gt;Pretty simple to implement:&lt;/p&gt;
&lt;script src="https://gist.github.com/2012869.js?file=gistfile1.m" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;You can grab it via github gist: &lt;a href="http://gist.github.com/141427"&gt;&lt;a href="http://gist.github.com/141427"&gt;http://gist.github.com/141427&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also to note, if the cache expired or there is no cache, it simply returns nil.  So all you need to do is check if it returns something, if not, grab the data you&amp;#8217;re looking for and cache it.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; For the latest code, visit the EGOCache page on GitHub: &lt;a href="http://github.com/enormego/EGOCache"&gt;&lt;a href="http://github.com/enormego/EGOCache"&gt;http://github.com/enormego/EGOCache&lt;/a&gt;&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description><link>http://egoco.de/post/19073703594</link><guid>http://egoco.de/post/19073703594</guid><pubDate>Mon, 06 Jul 2009 12:58:53 -0400</pubDate><category>objective-c</category><category>egocache</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>EGOTitledTableViewCell</title><description>&lt;p&gt;Here&amp;#8217;s a quick class I wrote to give you a title-table view cell as seen below:&lt;/p&gt;
&lt;p&gt;&lt;img alt="" height="157" src="http://f.cl.ly/items/0Z012D3k1c1u20230m2s/screenshot_2c6bbb0ddeba64a50.png" width="319"/&gt;&lt;/p&gt;
&lt;p&gt;You can grab the code on GitHub: &lt;a href="http://gist.github.com/122538"&gt;&lt;a href="http://gist.github.com/122538"&gt;http://gist.github.com/122538&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s a quick example of how to use it:&lt;/p&gt;
&lt;script src="https://gist.github.com/2012822.js?file=gistfile1.m" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;P.S. EGOTitledTableViewCell has properties for titleLabel and textLabel if you want to change the font/text properties.&lt;/p&gt;</description><link>http://egoco.de/post/19073471688</link><guid>http://egoco.de/post/19073471688</guid><pubDate>Tue, 02 Jun 2009 19:17:32 -0400</pubDate><category>objective-c</category><category>uitableview</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>EGODatabase, Finally Released</title><description>&lt;p&gt;We mentioned a few months ago on &lt;a href="http://twitter.com/enormego"&gt;Twitter&lt;/a&gt; that we were working on a thread-safe Objective-C wrapper for SQLite after using FMDB extensively in just about all of our apps.  We kind of felt like we were doing way too much work using FMDB to avoid thread issues, so we came up with EGODatabase.&lt;/p&gt;
&lt;p&gt;EGODatabase uses some code from FMDB, but for the most part, it was completely reworked to use result sets and row objects. One of the biggest differences between FMDB and EGODatabase, aside from EGODatabase being thread-safe, is when selecting data, EGODatabase populates its EGODatabaseRow class with the data from SQLite, as opposed to retaining the SQLite results like FMDB does.&lt;/p&gt;
&lt;p&gt;EGODatabase is tested to work with with iPhone OS and Mac OS X 10.5&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s a quick look at how EGODatabase works:&lt;/p&gt;
&lt;script src="https://gist.github.com/2012757.js?file=gistfile1.m" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;You can grab EGODatabase over at GitHub:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/enormego/egodatabase/tree/master"&gt;&lt;a href="http://github.com/enormego/egodatabase/tree/master"&gt;http://github.com/enormego/egodatabase/tree/master&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://egoco.de/post/19073101420</link><guid>http://egoco.de/post/19073101420</guid><pubDate>Sat, 23 May 2009 19:02:18 -0400</pubDate><category>objective-c</category><category>egodatabase</category><category>sqlite</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>Xcode "EGO" Theme</title><description>&lt;p&gt;&amp;#8220;EGO&amp;#8221; is the Xcode theme we created for our own personal use. We started with a copy of the &amp;#8220;Dusk&amp;#8221; theme and toned down the colors a bit to make it easier on the eyes.&lt;/p&gt;
&lt;p&gt;&amp;#8220;EGO&amp;#8221; uses the font &amp;#8220;DejaVu Sans Mono&amp;#8221; at 12pt. Some of you may know it as &amp;#8220;Panic Sans&amp;#8221; from Panic&amp;#8217;s Coda (which is a repackaged version of it).  You can grab the font over at &lt;a href="http://dejavu-fonts.org/wiki/index.php?title=Download"&gt;dejavu-fonts.org&lt;/a&gt;. If you already have Code installed, feel free to swap in Panic Sans in place of DejaVu Sans Mono.&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s a screenshot of &amp;#8220;EGO&amp;#8221; in action:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://cl.ly/2f1O1r071C3g1P3D2A0C/screenshot_0ff4380654cb6e57e.png" title="Xcode "&gt;&lt;img alt="Xcode " height="301" src="http://cl.ly/2f1O1r071C3g1P3D2A0C/screenshot_0ff4380654cb6e57e.png" width="513"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To get EGO run the following code in Terminal:&lt;/p&gt;
&lt;p&gt;&lt;code class="block"&gt;mkdir -p ~/Library/Application\ Support/Xcode/Color\ Themes; cd ~/Library/Library/Application\ Support/Xcode/Color\ Themes; curl -O &lt;a href="http://assets.egoco.de/egotheme/EGO.xccolortheme"&gt;http://assets.egoco.de/egotheme/EGO.xccolortheme&lt;/a&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now just restart Xcode, go to Preferences &amp;gt; Fonts &amp;amp; Colors, and select &amp;#8220;EGO&amp;#8221; from the color theme drop down.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; This will only work for Xcode 3.x. &lt;a href="http://egoco.de/post/19075121152/ego-xcode-theme-for-xcode-4-egov2"&gt;Click here to get EGO for Xcode 4 and EGOv2!&lt;/a&gt;&lt;/p&gt;</description><link>http://egoco.de/post/19071893943</link><guid>http://egoco.de/post/19071893943</guid><pubDate>Sat, 21 Mar 2009 16:34:00 -0400</pubDate><category>xcode</category><category>themes</category><category>egotheme</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>Security: Blocking SVN/Git files with LightTPD and Apache</title><description>&lt;p&gt;If you use a source control management solution like SVN or Git for your web applications like we do, you know how awesome it is to deploy changes on a production server. &lt;br/&gt;&lt;br/&gt; You can simply run &lt;code class="inline"&gt;svn up&lt;/code&gt; or &lt;code class="inline"&gt;git pull&lt;/code&gt; to update your web server with the latest revision of your app. &lt;br/&gt;&lt;br/&gt; There&amp;#8217;s a huge security risk involved here though. Using the standard Apache or LightTPD setup, all of the files in the .svn or .git directories, are available to download.&lt;/p&gt;
&lt;h2&gt;SVN Example&lt;/h2&gt;
&lt;p&gt;You have your app running out of &lt;code class="inline"&gt;/home/example.com/html/&lt;/code&gt;&lt;br/&gt; Let&amp;#8217;s say, the user wants the source code of your &lt;code class="inline"&gt;index.php&lt;/code&gt; file, all they would need to do is go to this URL:&lt;br/&gt;&lt;code&gt;&lt;a href="http://example.com/.svn/text-base/index.php.svn-base"&gt;http://example.com/.svn/text-base/index.php.svn-base&lt;/a&gt;&lt;/code&gt; That&amp;#8217;s it, there&amp;#8217;s your source code.&lt;/p&gt;
&lt;h2&gt;Git Example&lt;/h2&gt;
&lt;p&gt;Git can be even more dangerous depending on your setup (specifically, if they can browse directory listings). If they can download your .git directory, they now have a branch of your repository.&lt;/p&gt;
&lt;h2&gt;So how do I protect myself from this?&lt;/h2&gt;
&lt;p&gt;Some people like to run &lt;code class="inline"&gt;svn export&lt;/code&gt; instead of &lt;code class="inline"&gt;svn checkout&lt;/code&gt; or for git users, &lt;code class="inline"&gt;git checkout-index&lt;/code&gt; instead of &lt;code class="inline"&gt;git pull&lt;/code&gt;. &lt;br/&gt;&lt;br/&gt; Sure this works, but it&amp;#8217;s not ideal. You can&amp;#8217;t simply pull the changes and be live. &lt;br/&gt;&lt;br/&gt; After you checkout your app, do the follow:&lt;/p&gt;
&lt;h3&gt;Apache&lt;/h3&gt;
&lt;p&gt;Put the config items below in the .htaccess file in your root web directory:&lt;/p&gt;
&lt;script src="https://gist.github.com/2012732.js?file=gistfile1.sh" type="text/javascript"&gt;&lt;/script&gt;&lt;h3&gt;LightTPD&lt;/h3&gt;
&lt;p&gt;Put the config items below in your lighttpd config file:
&lt;script src="https://gist.github.com/2012740.js?file=gistfile1.sh" type="text/javascript"&gt;&lt;/script&gt;&lt;br/&gt;Now when you go to those files, you won&amp;#8217;t be able to access them.&lt;/p&gt;
&lt;h2&gt;Bonus Tip&lt;/h2&gt;
&lt;p&gt;Keep the majority of your code below a web accessible directory. All we have in our web accessible directory are our images and index.php file. Everything else sits below it in an app directory.&lt;/p&gt;</description><link>http://egoco.de/post/19072920202</link><guid>http://egoco.de/post/19072920202</guid><pubDate>Wed, 04 Mar 2009 14:06:35 -0500</pubDate><category>security</category><category>lighttpd</category><category>apache</category><category>svn</category><category>git</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>Cocoa Helpers</title><description>&lt;a href="https://github.com/enormego/cocoa-helpers"&gt;Cocoa Helpers&lt;/a&gt;: &lt;p&gt;We’ve just published all of the “helpers” we’ve accumulated over the last few months while developing iPhone our projects.&lt;/p&gt;
&lt;p&gt;They’re hosted on &lt;a href="https://github.com/enormego"&gt;GitHub&lt;/a&gt; and we’ll definitely be updating them as we develop more, you can check them out &lt;a href="https://github.com/enormego/cocoa-helpers"&gt;here: &lt;a href="https://github.com/enormego/cocoa-helpers"&gt;https://github.com/enormego/cocoa-helpers&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There’s a README at the bottom of that page listing all of the class categories and methods we’ve added.&lt;/p&gt;
&lt;p&gt;Most of these classes will work for both Mac and iPhone development, but any of the UI* classes are iPhone only.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;</description><link>http://egoco.de/post/19071130716</link><guid>http://egoco.de/post/19071130716</guid><pubDate>Thu, 05 Feb 2009 11:04:36 -0500</pubDate><category>objective-c</category><category>helpers</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item><item><title>iPhone SDK Available Memory</title><description>&lt;p&gt;The new app we&amp;#8217;re working on requires at least 14mb or so of free memory to perform a few actions, so we wanted to build in a warning to the user to let them know if their device doesn&amp;#8217;t have the memory available. Easy right? Not so.&lt;/p&gt;
&lt;p&gt;As far as I can tell, there&amp;#8217;s no method in the Objective-C portion of the iPhone SDK. After a bit of googling, I found this on Apple&amp;#8217;s mailing list. I&amp;#8217;ve re-worked it and wrapped it in Objective-C to provide easy access.&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s the code provided as a category to UIDevice:&lt;/p&gt;
&lt;script src="https://gist.github.com/2012597.js" type="text/javascript"&gt;&lt;![CDATA[// &lt;![CDATA[
 
// ]]]]&gt;&lt;![CDATA[&gt;]]&gt;&lt;/script&gt;&lt;p&gt;Now, it&amp;#8217;s pretty straight forward:&lt;/p&gt;
&lt;script src="https://gist.github.com/2012600.js" type="text/javascript"&gt;&lt;![CDATA[// &lt;![CDATA[
 
// ]]]]&gt;&lt;![CDATA[&gt;]]&gt;&lt;/script&gt;&lt;p&gt;Hope this helps someone!&lt;/p&gt;</description><link>http://egoco.de/post/19070883953</link><guid>http://egoco.de/post/19070883953</guid><pubDate>Tue, 27 Jan 2009 12:48:44 -0500</pubDate><category>objective-c</category><category>uidevice</category><category>shaun</category><dc:creator>shnhrrsn</dc:creator></item></channel></rss>
