<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-31373059</id><updated>2011-11-27T15:34:19.711-08:00</updated><title type='text'>Recapturing</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>tagify</name><uri>http://www.blogger.com/profile/17463656649565598561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-31373059.post-7490427406492658172</id><published>2009-07-10T15:39:00.001-07:00</published><updated>2009-07-10T15:39:41.058-07:00</updated><title type='text'>Objective-C: imports</title><content type='html'>There are two different ways of doing imports: with quotation marks and with angle brackets. For example, &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;#import &lt;Cocoa/Cocoa.h&gt; &lt;br /&gt;#import "Tire.h"&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The version with angle brackets is used for importing system header files. The quotes version indicates a header file that's local to the project. If you see a header file name in angle brackets, it's read-only for your project, because it's owned by the system. When a header file name is in quotes, you know that you (or someone else on the project) can make changes to it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-7490427406492658172?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/7490427406492658172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=7490427406492658172' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/7490427406492658172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/7490427406492658172'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/07/objective-c-imports.html' title='Objective-C: imports'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-5131272526425234988</id><published>2009-07-10T15:24:00.001-07:00</published><updated>2009-07-10T15:24:58.409-07:00</updated><title type='text'>Objective-C - @class</title><content type='html'>Objective-C introduces the @class keyword as a way to tell the compiler "this thing is a class, and therefore I'm only going to refer to it via a pointer." This calms the compiler down: it doesn't need to know more about the class, just that it's something referred to by a pointer.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;#import &lt;cocoa/cocoa.h&gt;&lt;br /&gt;@class Tire;&lt;br /&gt;@class Engine;&lt;br /&gt;&lt;br /&gt;@interface Car: NSobject&lt;br /&gt;  :&lt;br /&gt;  :&lt;br /&gt;@end // Car&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;@class sets up a forward reference. This is a way to tell the compiler "Trust me, you'll learn eventually what this is, but for now, this is all you need to know."&lt;br /&gt;&lt;br /&gt;@class is also useful if you have a circular dependency. That is, Class A uses Class B, and Class B uses Class A. If you try having each class #import the other, you’ll end up with compilation errors. But if you use @class B in A.h and @class A in B.h, the two classes can refer to each other happily.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-5131272526425234988?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/5131272526425234988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=5131272526425234988' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/5131272526425234988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/5131272526425234988'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/07/objective-c-class.html' title='Objective-C - @class'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-4044996700396386632</id><published>2009-07-02T21:04:00.000-07:00</published><updated>2009-07-02T21:07:33.225-07:00</updated><title type='text'>iPhone Firmware Files</title><content type='html'>The direct links to the iPhone Firmware Files for every released firmware version.&lt;br /&gt;&lt;br /&gt;1.0.0: &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-3538.20070629.B7vXa/iPhone1,1_1.0_1A543a_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_1.0_1A543a_Restore.ipsw&lt;/a&gt;&lt;br /&gt;1.0.1: &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-3614.20070731.Nt6Y7/iPhone1,1_1.0.1_1C25_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_1.0.1_1C25_Restore.ipsw&lt;/a&gt;&lt;br /&gt;1.0.2: &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-3823.20070821.vormd/iPhone1,1_1.0.2_1C28_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_1.0.2_1C28_Restore.ipsw&lt;/a&gt;&lt;br /&gt;1.1.1: &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-3883.20070927.In76t/iPhone1,1_1.1.1_3A109a_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_1.1.1_3A109a_Restore.ipsw&lt;/a&gt;&lt;br /&gt;1.1.2: &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-4037.20071107.5Bghn/iPhone1,1_1.1.2_3B48b_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_1.1.2_3B48b_Restore.ipsw&lt;/a&gt;&lt;br /&gt;1.1.3: &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-4061.20080115.4Fvn7/iPhone1,1_1.1.3_4A93_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_1.1.3_4A93_Restore.ipsw&lt;/a&gt;&lt;br /&gt;1.1.4: &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-4313.20080226.Sw39i/iPhone1,1_1.1.4_4A102_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_1.1.4_4A102_Restore.ipsw&lt;/a&gt;&lt;br /&gt;2.0.0 (2G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-4956.20080710.V50OI/iPhone1,1_2.0_5A347_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_2.0_5A347_Restore.ipsw&lt;/a&gt;&lt;br /&gt;2.0.0 (3G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-4955.20080710.bgt53/iPhone1,2_2.0_5A347_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,2_2.0_5A347_Restore.ipsw&lt;/a&gt;&lt;br /&gt;2.0.1 (2G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5135.20080729.Vfgtr/iPhone1,1_2.0.1_5B108_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_2.0.1_5B108_Restore.ipsw&lt;/a&gt;&lt;br /&gt;2.0.1 (3G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5134.20080729.Q2W3E/iPhone1,2_2.0.1_5B108_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,2_2.0.1_5B108_Restore.ipsw&lt;/a&gt;&lt;br /&gt;2.0.2 (2G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5246.20080818.2V0hO/iPhone1,1_2.0.2_5C1_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_2.0.2_5C1_Restore.ipsw&lt;/a&gt;&lt;br /&gt;2.0.2 (3G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5241.20080818.t5Fv3/iPhone1,2_2.0.2_5C1_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,2_2.0.2_5C1_Restore.ipsw&lt;/a&gt;&lt;br /&gt;2.1.0 (2G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5202.20080909.gkbEj/iPhone1,1_2.1_5F136_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_2.1_5F136_Restore.ipsw&lt;/a&gt;&lt;br /&gt;2.1.0 (3G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5198.20080909.K3294/iPhone1,2_2.1_5F136_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,2_2.1_5F136_Restore.ipsw&lt;/a&gt;&lt;br /&gt;2.2.0 (2G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5779.20081120.Pt5yH/iPhone1,1_2.2_5G77_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_2.2_5G77_Restore.ipsw&lt;/a&gt;&lt;br /&gt;2.2.0 (3G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5778.20081120.Aqw4R/iPhone1,2_2.2_5G77_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,2_2.2_5G77_Restore.ipsw&lt;/a&gt;&lt;br /&gt;2.2.1 (2G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5830.20090127.Mmni6/iPhone1,1_2.2.1_5H11_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_2.2.1_5H1_Restore.ipsw&lt;/a&gt;&lt;br /&gt;2.2.1 (3G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5828.20090127.aQLi8/iPhone1,2_2.2.1_5H11_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,2_2.2.1_5H11_Restore.ipsw&lt;/a&gt;&lt;br /&gt;3.0.0 (2G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6580.20090617.XsP76/iPhone1,1_3.0_7A341_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,1_3.0_7A341_Restore.ipsw&lt;/a&gt;&lt;br /&gt;3.0.0 (3G): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6578.20090617.VfgtU/iPhone1,2_3.0_7A341_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone1,2_3.0_7A341_Restore.ipsw&lt;/a&gt;&lt;br /&gt;3.0.0 (3GS): &lt;a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6582.20090617.LlI87/iPhone2,1_3.0_7A341_Restore.ipsw" target="_blank" style="color: rgb(102, 102, 102); text-decoration: none; "&gt;iPhone2,1_3.0_7A341_Restore.ipsw&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-4044996700396386632?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/4044996700396386632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=4044996700396386632' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/4044996700396386632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/4044996700396386632'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/07/iphone-firmware-files.html' title='iPhone Firmware Files'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-8681154879001492986</id><published>2009-06-26T15:48:00.001-07:00</published><updated>2009-06-26T15:48:41.193-07:00</updated><title type='text'>Objective-c: color</title><content type='html'>Colors can be created as white levels, using hue, or as an RGB composite.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;UIColor *myWhiteTransparentColor = [ UIColor colorWithWhite: 1.0 alpha: 0.50 ];&lt;br /&gt;&lt;br /&gt;UIColor *myColorHue = [ UIColor colorWithHue: 120.0 / 360.0&lt;br /&gt;    saturation: 0.75&lt;br /&gt;    brightness: 0.50&lt;br /&gt;    alpha: 1.0&lt;br /&gt;];&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To create a simple RGB color, specify a set of four floating-point values for red, green, blue, and alpha (opacity) with values between 0.0 and 1.0. These represent values ranging from 0% (0.0) to 100% (1.0):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;UIColor *myColorRGB = [ UIColor colorWithRed: 0.75&lt;br /&gt;    green: 1.0&lt;br /&gt;    blue: 0.75&lt;br /&gt;    alpha: 1.0&lt;br /&gt;];&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;                     &lt;br /&gt;&lt;br /&gt;The UIColor class also supports many static methods to create system colors, which are calibrated by the iPhone as closely as possible. These methods include the following, from UIColor.h:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;+ (UIColor *)blackColor;      // 0.0 white&lt;br /&gt;+ (UIColor *)darkGrayColor;   // 0.333 white&lt;br /&gt;+ (UIColor *)lightGrayColor;  // 0.667 white&lt;br /&gt;+ (UIColor *)whiteColor;      // 1.0 white&lt;br /&gt;+ (UIColor *)grayColor;       // 0.5 white&lt;br /&gt;+ (UIColor *)redColor;        // 1.0, 0.0, 0.0 RGB&lt;br /&gt;+ (UIColor *)greenColor;      // 0.0, 1.0, 0.0 RGB&lt;br /&gt;+ (UIColor *)blueColor;       // 0.0, 0.0, 1.0 RGB&lt;br /&gt;+ (UIColor *)cyanColor;       // 0.0, 1.0, 1.0 RGB&lt;br /&gt;+ (UIColor *)yellowColor;     // 1.0, 1.0, 0.0 RGB&lt;br /&gt;+ (UIColor *)magentaColor;    // 1.0, 0.0, 1.0 RGB&lt;br /&gt;+ (UIColor *)orangeColor;     // 1.0, 0.5, 0.0 RGB&lt;br /&gt;+ (UIColor *)purpleColor;     // 0.5, 0.0, 0.5 RGB&lt;br /&gt;+ (UIColor *)brownColor;      // 0.6, 0.4, 0.2 RGB&lt;br /&gt;+ (UIColor *)clearColor;      // 0.0 white, 0.0 alpha&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you plan on reusing many different UIColor objects, you may also create instances of them:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;UIColor *myWhiteTransparentColor = [ [ UIColor alloc ]&lt;br /&gt;    initWithWhite: 1.0 alpha: 0.50&lt;br /&gt;];&lt;br /&gt;&lt;br /&gt;UIColor *myColorHue = [ [ UIColor alloc ]&lt;br /&gt;    initWithHue: 120.0 / 360.0&lt;br /&gt;    saturation: 0.75&lt;br /&gt;    brightness: 0.50&lt;br /&gt;    alpha: 1.0&lt;br /&gt;];&lt;br /&gt;&lt;br /&gt;UIColor *myColorRGB = [ [ UIColor alloc ] initWithRed: 0.75&lt;br /&gt;    green: 1.0&lt;br /&gt;    blue: 0.75&lt;br /&gt;    alpha: 1.0&lt;br /&gt;];&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-8681154879001492986?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/8681154879001492986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=8681154879001492986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/8681154879001492986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/8681154879001492986'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/06/objective-c-color.html' title='Objective-c: color'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-1398135606324546471</id><published>2009-06-26T15:06:00.001-07:00</published><updated>2009-06-26T15:06:41.692-07:00</updated><title type='text'>Objective-C: Font and size</title><content type='html'>The text font (typeface) and point size can be set by assigning a UIFont object to the text view's font property. To create a UIFont object, use a static method named fontWithName:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;UIFont *myFont = [ UIFont fontWithName: @"Arial" size: 18.0 ];&lt;br /&gt;textView.font = myFont;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In addition, three other static methods exist for easily creating system fonts:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;UIFont *mySystemFont = [ UIFont systemFontOfSize: 12.0 ];&lt;br /&gt;UIFont *myBoldSystemFont = [ UIFont boldSystemFontOfSize: 12.0 ];&lt;br /&gt;UIFont *myItalicSystemFont = [ UIFont italicSystemFontOfSize: 12.0 ];&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Preinstalled on the iPhone and can be referenced by name:&lt;br /&gt;&lt;br /&gt;American Typewriter&lt;br /&gt;Apple Gothic&lt;br /&gt;Arial&lt;br /&gt;Arial Rounded MT Bold&lt;br /&gt;Courier&lt;br /&gt;Courier New&lt;br /&gt;Georgia&lt;br /&gt;Helvetica&lt;br /&gt;Helvetica Neue&lt;br /&gt;Marker Felt&lt;br /&gt;Times&lt;br /&gt;Times New Roman&lt;br /&gt;Trebuchet MS&lt;br /&gt;Verdana&lt;br /&gt;Zapfino&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-1398135606324546471?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/1398135606324546471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=1398135606324546471' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/1398135606324546471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/1398135606324546471'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/06/objective-c-font-and-size.html' title='Objective-C: Font and size'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-3119324842793262365</id><published>2009-06-24T14:40:00.002-07:00</published><updated>2009-07-10T21:40:41.788-07:00</updated><title type='text'>Objective-C: Parse the date into integers</title><content type='html'>Use the default styles defined in NSDateFormatterStyle.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];&lt;br /&gt;[dateFormatter setDateStyle:NSDateFormatterNoStyle];&lt;br /&gt;[dateFormatter setTimeStyle:NSDateFormatterShortStyle];&lt;br /&gt;NSString* currentTime = [dateFormatter stringFromDate:[NSDate date]];&lt;br /&gt;[dateFormatter release];&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Set your own time format:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];&lt;br /&gt;&lt;br /&gt;[dateFormatter setDateFormat:@"yyyy"];&lt;br /&gt;int year = [[dateFormatter stringFromDate:[NSDate date]] intValue];&lt;br /&gt;&lt;br /&gt;[dateFormatter setDateFormat:@"MM"];&lt;br /&gt;int month = [[dateFormatter stringFromDate:[NSDate date]] intValue];&lt;br /&gt;&lt;br /&gt;[dateFormatter setDateFormat:@"hh:mm:ss"]&lt;br /&gt;NSString *time = [dateFormatter stringFromDate:[NSDate date]];&lt;br /&gt;&lt;br /&gt;[dateFormatter release];&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;What's the NSDateFormatter format specifiers are available to format the string?&lt;br /&gt;A table to list out some symbol for reference, &lt;a href="http://www.stepcase.com/blog/2008/12/02/format-string-for-the-iphone-nsdateformatter/"&gt;link&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;However, you could Use  the NSDateComponents class instead&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;NSCalendar *calendar= [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];&lt;br /&gt;NSCalendarUnit unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit |  &lt;br /&gt;    NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | &lt;br /&gt;    NSSecondCalendarUnit;&lt;br /&gt;NSDate *date = [NSDate date];&lt;br /&gt;NSDateComponents *dateComponents = [calendar components:unitFlags fromDate:date];&lt;br /&gt;&lt;br /&gt;NSInteger year = [dateComponents year];&lt;br /&gt;NSInteger month = [dateComponents month];&lt;br /&gt;NSInteger day = [dateComponents day];&lt;br /&gt;NSInteger hour = [dateComponents hour];&lt;br /&gt;NSInteger minute = [dateComponents minute];&lt;br /&gt;NSInteger second = [dateComponents second];&lt;br /&gt;&lt;br /&gt;[calendar release];&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-3119324842793262365?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/3119324842793262365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=3119324842793262365' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/3119324842793262365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/3119324842793262365'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/06/objective-c-parse-date-into-integers_24.html' title='Objective-C: Parse the date into integers'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-1297349934972275340</id><published>2009-06-24T14:40:00.001-07:00</published><updated>2009-07-10T21:41:22.134-07:00</updated><title type='text'>Objective-C: Parse the date into integers</title><content type='html'>Use the default styles defined in NSDateFormatterStyle.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];&lt;br /&gt;[dateFormatter setDateStyle:NSDateFormatterNoStyle];&lt;br /&gt;[dateFormatter setTimeStyle:NSDateFormatterShortStyle];&lt;br /&gt;NSString* currentTime = [dateFormatter stringFromDate:[NSDate date]];&lt;br /&gt;[dateFormatter release];&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Set your own time format:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];&lt;br /&gt;&lt;br /&gt;[dateFormatter setDateFormat:@"yyyy"];&lt;br /&gt;int year = [[dateFormatter stringFromDate:[NSDate date]] intValue];&lt;br /&gt;&lt;br /&gt;[dateFormatter setDateFormat:@"MM"];&lt;br /&gt;int month = [[dateFormatter stringFromDate:[NSDate date]] intValue];&lt;br /&gt;&lt;br /&gt;[dateFormatter setDateFormat:@"hh:mm:ss"]&lt;br /&gt;NSString *time = [dateFormatter stringFromDate:[NSDate date]];&lt;br /&gt;&lt;br /&gt;[dateFormatter release];&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;What's the NSDateFormatter format specifiers are available to format the string?&lt;br /&gt;A table to list out some symbol for reference &lt;br /&gt;http://www.stepcase.com/blog/2008/12/02/format-string-for-the-iphone-nsdateformatter/&lt;br /&gt;&lt;br /&gt;However, you could Use  the NSDateComponents class instead&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;NSCalendar *calendar= [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];&lt;br /&gt;NSCalendarUnit unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit |&lt;br /&gt;  NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | &lt;br /&gt;  NSSecondCalendarUnit;&lt;br /&gt;NSDate *date = [NSDate date];&lt;br /&gt;NSDateComponents *dateComponents = [calendar components:unitFlags fromDate:date];&lt;br /&gt;&lt;br /&gt;NSInteger year = [dateComponents year];&lt;br /&gt;NSInteger month = [dateComponents month];&lt;br /&gt;NSInteger day = [dateComponents day];&lt;br /&gt;NSInteger hour = [dateComponents hour];&lt;br /&gt;NSInteger minute = [dateComponents minute];&lt;br /&gt;NSInteger second = [dateComponents second];&lt;br /&gt;&lt;br /&gt;[calendar release];&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-1297349934972275340?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/1297349934972275340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=1297349934972275340' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/1297349934972275340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/1297349934972275340'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/06/objective-c-parse-date-into-integers.html' title='Objective-C: Parse the date into integers'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-6099797677273557751</id><published>2009-06-12T23:24:00.001-07:00</published><updated>2009-06-12T23:24:46.423-07:00</updated><title type='text'>UIViewController key methods</title><content type='html'>&lt;span style="font-weight:bold;"&gt;loadView:&lt;/span&gt;&lt;br /&gt;- Build hierarchy&lt;br /&gt;- When not using Interface Builder&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;viewDidLoad:&lt;/span&gt;&lt;br /&gt;- Load additional resources or data&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;viewWillAppear&lt;/span&gt;&lt;br /&gt;- On-screen (re)preparation&lt;br /&gt;- View may not reload on every showing&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;viewDidAppear:&lt;/span&gt;&lt;br /&gt;- Animations or other visual changes&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-6099797677273557751?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/6099797677273557751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=6099797677273557751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/6099797677273557751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/6099797677273557751'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/06/uiviewcontroller-key-methods.html' title='UIViewController key methods'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-2907598051651410503</id><published>2009-06-09T10:16:00.000-07:00</published><updated>2009-06-09T13:24:35.102-07:00</updated><title type='text'>objective-c: UIFont</title><content type='html'>To create a UIFont object, use a static method named fontWithName:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;UIFont *myFont = [ UIFont fontWithName: @"Arial" size: 18.0 ];&lt;br /&gt;textView.font = myFont;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;There are three other static methods exist for easily creating system fonts:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;UIFont *theSystemFont = [ UIFont systemFontOfSize: 12.0 ];&lt;br /&gt;UIFont *theBoldSystemFont = [ UIFont boldSystemFontOfSize: 12.0 ];&lt;br /&gt;UIFont *theItalicSystemFont = [ UIFont italicSystemFontOfSize: 12.0 ];&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The preinstalled fonts on the iPhone and can be referenced by name:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;American Typewriter &lt;br /&gt;Apple Gothic &lt;br /&gt;Arial &lt;br /&gt;Arial Rounded MT Bold &lt;br /&gt;Courier &lt;br /&gt;Courier New &lt;br /&gt;Georgia &lt;br /&gt;Helvetica &lt;br /&gt;Helvetica Neue &lt;br /&gt;Marker Felt &lt;br /&gt;Times &lt;br /&gt;Times New Roman &lt;br /&gt;Trebuchet MS &lt;br /&gt;Verdana &lt;br /&gt;Zapfino&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-2907598051651410503?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/2907598051651410503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=2907598051651410503' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/2907598051651410503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/2907598051651410503'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/06/c-objective-uifont.html' title='objective-c: UIFont'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-4170120706051768319</id><published>2009-06-08T10:57:00.000-07:00</published><updated>2009-06-08T10:59:42.037-07:00</updated><title type='text'>objective-c:  iPhone screen</title><content type='html'>To build a window, you need a frame. A frame is a rectangular region on the screen where your content should be displayed. Two methods exist inside a class named UIScreen to determine this.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The bounds method returns the entire screen's boundaries, including the space used by the status bar:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;CGRect screenBounds = [ [ UIScreen mainScreen ] bounds ];&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The applicationFrame method returns the displayable portion of the screen in which your application will be displayed. This space does not include the status bar:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;CGRect screenBounds = [ [ UIScreen mainScreen ] applicationFrame ];&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-4170120706051768319?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/4170120706051768319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=4170120706051768319' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/4170120706051768319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/4170120706051768319'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/06/objective-c-iphone-screen.html' title='objective-c:  iPhone screen'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-1219060054688068344</id><published>2009-05-28T10:45:00.000-07:00</published><updated>2009-05-28T10:46:45.369-07:00</updated><title type='text'>Objective-c: Class Introspection</title><content type='html'>&lt;UL&gt;&lt;br /&gt;    &lt;LI&gt;You can ask an object about its class:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;NSLog(@"The class is %@", [myObject className]);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt; &lt;/LI&gt;&lt;br /&gt; &lt;LI&gt;Testing for general class membership (subclasses included):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;For example, in this code, isKindOfClass: would return YES because, in Foundation, the NSArchiver class inherits from NSCoder: &lt;br /&gt;&lt;br /&gt;NSMutableData *myData = [NSMutableData dataWithCapacity:30];&lt;br /&gt;id anArchiver = [[NSArchiver alloc] initForWritingWithMutableData:myData];&lt;br /&gt;if ( [anArchiver isKindOfClass:[NSCoder class]] )&lt;br /&gt;  ....&lt;br /&gt;    &lt;/LI&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt; &lt;LI&gt;Testing for specific class membership (subclasses excluded):&lt;br /&gt;&lt;pre&gt; &lt;br /&gt;For example, in this code, isMemberOfClass: would return NO: &lt;br /&gt;&lt;br /&gt;NSMutableData *myData = [NSMutableData dataWithCapacity:30];&lt;br /&gt;id anArchiver = [[NSArchiver alloc] initForWritingWithMutableData:myData];&lt;br /&gt;if ([anArchiver isMemberOfClass:[NSCoder class]])&lt;br /&gt;    ...&lt;br /&gt;&lt;/pre&gt; &lt;br /&gt; &lt;/LI&gt;&lt;br /&gt;&lt;/UL&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-1219060054688068344?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/1219060054688068344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=1219060054688068344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/1219060054688068344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/1219060054688068344'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/05/objective-c-class-introspection.html' title='Objective-c: Class Introspection'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-19244160162342018</id><published>2009-05-22T09:04:00.000-07:00</published><updated>2009-05-22T09:07:18.594-07:00</updated><title type='text'>iPhone SDK: Customizing the UITableViewCell</title><content type='html'>I found a great article today, is on the Atrexis Blog and it shows you how to create custom table view cells. This is how you can present fancy UI elements in lists of data.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://blog.atrexis.com/images//CustomCell_02.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 750px; height: 350px;" src="http://blog.atrexis.com/images//CustomCell_02.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is the complete article: &lt;a href="http://blog.atrexis.com/index.cfm/2009/1/6/iPhone–Customize-the-UITableCellView"&gt;http://blog.atrexis.com/index.cfm/2009/1/6/iPhone–Customize-the-UITableCellView&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-19244160162342018?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/19244160162342018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=19244160162342018' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/19244160162342018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/19244160162342018'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/05/iphone-sdk-customizing-uitableviewcell.html' title='iPhone SDK: Customizing the UITableViewCell'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-6423968884875079273</id><published>2009-05-22T08:05:00.000-07:00</published><updated>2009-05-22T08:07:00.159-07:00</updated><title type='text'>Objective-c: Creating UIColor objects from hex values</title><content type='html'>I found a trick online today on how to automatically generate that code, by simply using a macro:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#define UIColorFromRGB(rgbValue) [UIColor \&lt;br /&gt;    colorWithRed:((float)((rgbValue &amp; 0xFF0000) &gt;&gt; 16))/255.0 \&lt;br /&gt;    green:((float)((rgbValue &amp; 0xFF00) &gt;&gt; 8))/255.0 \&lt;br /&gt;    blue:((float)(rgbValue &amp; 0xFF))/255.0 alpha:1.0]&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-6423968884875079273?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/6423968884875079273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=6423968884875079273' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/6423968884875079273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/6423968884875079273'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/05/objective-c-creating-uicolor-objects.html' title='Objective-c: Creating UIColor objects from hex values'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-4356103253159562547</id><published>2009-05-21T09:31:00.001-07:00</published><updated>2009-05-23T07:09:07.779-07:00</updated><title type='text'>iphone SDK: Stretchable Images</title><content type='html'>&lt;div&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;strong&gt;Stretchable Images&lt;/strong&gt; are an   interesting concept. A stretchable image is a resizable image that knows how to   resize itself intelligently so that it maintains the correct appearance. End   caps are the parts of an image, measured in pixels, that should not be resized.   We want the bevel around the edges to stay the same no matter what size we make   the button, so we specify a left end cap size of 12. For example.&lt;/span&gt;&lt;/div&gt;  &lt;div&gt; &lt;/div&gt;  &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;UIImage *buttonImageNormal = [UIImage   imageNamed:@"whiteButton.png"];&lt;br /&gt;UIImage *stretchableButtonImageNormal =   [buttonImageNormal&lt;br /&gt;         stretchableImageWithLeftCapWidth:12 topCapHeight:0];&lt;br /&gt;[myButton   setBackgroundImage:stretchableButtonImageNormal   forState:UIControlStateNormal];&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;div&gt; &lt;/div&gt;  &lt;div&gt;&lt;span class="115552816-21052009"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;More detail &lt;a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIImage_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006890-CH3-SW22"&gt;here   &lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-4356103253159562547?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/4356103253159562547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=4356103253159562547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/4356103253159562547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/4356103253159562547'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/05/iphone-development-stretchable-images.html' title='iphone SDK: Stretchable Images'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-7174991778118807257</id><published>2009-05-20T14:06:00.001-07:00</published><updated>2009-05-21T11:35:59.131-07:00</updated><title type='text'>Objective-C: Check whether an NSArray contains a certain object or not?</title><content type='html'>For checking whether an NSArray contains a certain object or not, you should use the -containsObject: method, as in the following example: &lt;br /&gt;&lt;br /&gt;&lt;pre&gt; &lt;br /&gt;NSArray *array;&lt;br /&gt;&lt;br /&gt;array = [NSArray arrayWithObjects: @"Nicola", @"Margherita",&lt;br /&gt;                                   @"Luciano", @"Silvia", nil];&lt;br /&gt;&lt;br /&gt;if ([array containsObject: @"Nicola"]) // YES&lt;br /&gt;  {&lt;br /&gt;    // Do something&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;-containsObject: compares the objects using -isEqual:, which is usually what you want: e.g., two NSString objects containing the same UNICODE characters would be considered equal, even if they are not the same object. &lt;br /&gt;To get the index of an object, you can use -indexOfObject:, which returns the index of the object (better, of an object equal to the argument), or the constant NSNotFound if no object equal to the argument can be found in the array, as in the following example: &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;NSArray *array;&lt;br /&gt;int i, j;&lt;br /&gt;&lt;br /&gt;array = [NSArray arrayWithObjects: @"Nicola", @"Margherita",&lt;br /&gt;                                   @"Luciano", @"Silvia", nil];&lt;br /&gt;&lt;br /&gt;i = [array indexOfObject: @"Margherita"]) // 1&lt;br /&gt;j = [array indexOfObject: @"Luca"]) // NSNotFound&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-7174991778118807257?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/7174991778118807257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=7174991778118807257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/7174991778118807257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/7174991778118807257'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/05/objective-c-check-whether-nsarray.html' title='Objective-C: Check whether an NSArray contains a certain object or not?'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-702022016173937134</id><published>2009-05-20T10:33:00.001-07:00</published><updated>2009-05-27T22:46:29.579-07:00</updated><title type='text'>iPhone SDK: Getting Paths to Directories of an iPhone application</title><content type='html'>Here is some notes   about how to get the path to the common directories of iPhone   application:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;// To obtain the Bundle &lt;br /&gt;NSString *path = [[NSBundle mainBundle] pathForResource:@"mydocument" ofType:@"plist"];&lt;br /&gt;list = [[NSArray alloc] initWithContentsOfFile:path];&lt;br /&gt;&lt;br /&gt;// To obtain the &amp;lt;Application_Home&amp;gt;/tmp/ path in NSString&lt;br /&gt;NSString *tempPath = NSTemporaryDirectory();&lt;br /&gt;NSString *tempFile = [tempPath stringByAppendingPathComponent:@"tempFile.txt"];&lt;br /&gt;&lt;br /&gt;// To obtain the &amp;lt;Application_Home&amp;gt;/Library/Caches path in NSString&lt;br /&gt;NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);&lt;br /&gt;NSString *cachesDirectory = [paths objectAtIndex:0];&lt;br /&gt;NSString *cacheFile = [cachesDirectory stringByAppendingPathComponent:@"cache.txt"];&lt;br /&gt;&lt;br /&gt;// To obtain the &amp;lt;Application_Home&amp;gt;/Documents/ path in NSString&lt;br /&gt;NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);&lt;br /&gt;NSString *documentsDirectory = [paths objectAtIndex:0];&lt;br /&gt;NSString *documentFile = [documentsDirectory stringByAppendingPathComponent:@"document.doc"];&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;More information,   please refer to &lt;a href="http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/FilesandNetworking/FilesandNetworking.html#//apple_ref/doc/uid/TP40007072-CH21-SW6"&gt;developer.apple.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-702022016173937134?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/702022016173937134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=702022016173937134' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/702022016173937134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/702022016173937134'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/05/getting-paths-to-directories-of-iphone.html' title='iPhone SDK: Getting Paths to Directories of an iPhone application'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-9206149781219927728</id><published>2009-05-20T09:26:00.001-07:00</published><updated>2009-05-25T20:30:41.265-07:00</updated><title type='text'>Objective-C: Quick Way to Deal with Dates</title><content type='html'>NSDate is the name of the class that is used to work with dates and NSDateFormatter is used to transform dates into something that can be presented to the user.&lt;br /&gt;&lt;br /&gt;The most common thing people want to do with dates is to simply get today's date. Here is how you do that:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;NSDate *date =[NSDate date];&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, if you were to write this out to the log or use as text on a user control then you would end up with something like this:  2009-05-20 08:36:33 -0500&lt;br /&gt;&lt;br /&gt;But How Do You Get the Date When It Is Not Today's Date?&lt;br /&gt;&lt;br /&gt;All you need to do is this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;NSDate *date = [NSDate dateWithNaturalLanguageString:@"05/10/09"];&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To pretty this up, use NSDateFormatter like so:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;NSDateFormatter *df = [[NSDateFormatter alloc] init];&lt;br /&gt;df.dateStyle = NSDateFormatterLongStyle;&lt;br /&gt;[ASFunctions logThis:@"formatted date:" andThisObject:[df stringFromDate:date]];&lt;br /&gt;[df release];&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This code will output something like this to the log:&lt;br /&gt;&lt;br /&gt;May 20, 2009&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-9206149781219927728?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/9206149781219927728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=9206149781219927728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/9206149781219927728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/9206149781219927728'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/05/quick-way-to-deal-with-dates-in.html' title='Objective-C: Quick Way to Deal with Dates'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-5238848370419280850</id><published>2009-05-20T09:20:00.001-07:00</published><updated>2009-05-25T20:25:31.959-07:00</updated><title type='text'>iPhone SDK: How to share variables between views?</title><content type='html'>&lt;!-- Converted from text/plain format --&gt;  &lt;DIV&gt;&lt;FONT size=2&gt;&lt;U&gt;Approach 1&lt;/U&gt;&amp;nbsp;&lt;BR&gt;&lt;BR&gt;Either &lt;/FONT&gt;&lt;FONT   size=2&gt;&lt;/DIV&gt;  &lt;UL&gt;    &lt;LI&gt;create instance vars in both controllers and set them accordingly to point     to the same object (from the App Delegate) &lt;/LI&gt;    &lt;LI&gt;create an instance variable on the App Delegate and access it from within     the view controllers&lt;BR&gt;&lt;BR&gt;&lt;/LI&gt;&lt;/UL&gt;  &lt;DIV&gt;&lt;U&gt;Approach 2&lt;/U&gt;&lt;BR&gt;&lt;BR&gt;Simply declare the variable in some shared header   file, then import that file wherever you want to access that   variable.&lt;BR&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;NavigationBaseAppDelegate *delegate = [[UIApplication sharedApplication] delegate];&lt;br /&gt;UINavigationController *navigationController = [delegate navigationController];&lt;br /&gt; &lt;br /&gt;AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil];&lt;br /&gt;[navigationController pushViewController:anotherViewController animated:YES];&lt;br /&gt;[anotherViewController release];&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-5238848370419280850?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/5238848370419280850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=5238848370419280850' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/5238848370419280850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/5238848370419280850'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/05/iphone-development-how-to-share.html' title='iPhone SDK: How to share variables between views?'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-1845259380137522382</id><published>2009-05-20T08:44:00.001-07:00</published><updated>2009-05-20T08:44:49.675-07:00</updated><title type='text'>Seven things all iPhone apps need</title><content type='html'>&lt;!-- Converted from text/plain format --&gt;  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;If you've got an iPhone or iPod Touch you've   probably downloaded some apps to play with. If you've downloaded more than one,   you'll quickly realize that some are better than others.&lt;BR&gt;&lt;BR&gt;For developers   there are lots of choices to make when crafting an app; not only does the app   need to be based around a good idea, but the app needs to behave in a way that   is familiar to iPhone users. If it takes a user more than a minute or so to   figure out how your app works, chances are they'll never use it again and will   leave you a bad rating.&lt;BR&gt;&lt;BR&gt;Both outcomes are bad, particularly when you   consider that to be successful in the store, your app needs to be in one of the   'top' something lists.&lt;/FONT&gt;&lt;/DIV&gt;  &lt;UL&gt;    &lt;LI&gt;&lt;FONT face=Arial size=2&gt;An iPhone app should do one thing well&lt;/FONT&gt;&lt;/LI&gt;    &lt;LI&gt;&lt;FONT face=Arial size=2&gt;Make sure it performs all tasks well&lt;/FONT&gt;&lt;/LI&gt;    &lt;LI&gt;&lt;FONT face=Arial size=2&gt;Use icons and imagery that are   familiar&lt;/FONT&gt;&lt;/LI&gt;    &lt;LI&gt;&lt;FONT face=Arial size=2&gt;All apps should autosave&lt;/FONT&gt;&lt;/LI&gt;    &lt;LI&gt;&lt;FONT face=Arial size=2&gt;Let me listen to my music&lt;/FONT&gt;&lt;/LI&gt;    &lt;LI&gt;&lt;FONT face=Arial size=2&gt;Where appropriate, all apps should be location     aware&lt;/FONT&gt;&lt;/LI&gt;    &lt;LI&gt;&lt;FONT face=Arial size=2&gt;Focus on minimal startup time&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;Full article &lt;A   href="http://apcmag.com/seven_things_all_iphone_apps_need.htm"&gt;here&lt;/A&gt;   &lt;/FONT&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-1845259380137522382?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/1845259380137522382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=1845259380137522382' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/1845259380137522382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/1845259380137522382'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/05/seven-things-all-iphone-apps-need.html' title='Seven things all iPhone apps need'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-6176448548991587538</id><published>2009-05-20T08:36:00.001-07:00</published><updated>2009-05-22T09:09:16.506-07:00</updated><title type='text'>iPhone SDK: Applying a Basic Animation Fade In, Fade Out to a single Layer of a View</title><content type='html'>&lt;div&gt;&lt;span class="483133215-20052009"&gt;This article to explain to &lt;/span&gt;you how to   create a view that fades in and out&lt;span class="483133215-20052009"&gt;. This article   may be &lt;/span&gt;a little more advanced than the typical article toward   newbie. &lt;span class="483133215-20052009"&gt;Have a look &lt;/span&gt;&lt;span class="483133215-20052009"&gt;to get &lt;/span&gt;what kind of &lt;span class="483133215-20052009"&gt;idea &lt;/span&gt;can inject into your next iPhone app&lt;span class="483133215-20052009"&gt;.&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt; &lt;/div&gt;  &lt;div&gt;&lt;span class="483133215-20052009"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Here is the link to   the article:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;a href="http://billabonger.net/blog/2009/03/apply-a-fade-animation-to-an-uiimageview/"&gt;Apply   a Fade Animation to an UIImageView&lt;/a&gt;&lt;/div&gt;  &lt;div&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-6176448548991587538?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/6176448548991587538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=6176448548991587538' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/6176448548991587538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/6176448548991587538'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2009/05/applying-basic-animation-fade-in-fade.html' title='iPhone SDK: Applying a Basic Animation Fade In, Fade Out to a single Layer of a View'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-5446255828676298135</id><published>2008-12-14T22:52:00.001-08:00</published><updated>2008-12-14T22:52:53.272-08:00</updated><title type='text'>great jquery plugin </title><content type='html'>1. jCarousel &lt;br /&gt;&lt;br /&gt;jCarousel is a jQuery plugin for controlling a list of items in horizontal or vertical order. The items, which can be static HTML content or loaded with (or without) AJAX, can be scrolled back and forth (with or without animation).&lt;br /&gt;&lt;br /&gt;Live sample at &lt;a href="http://sorgalla.com/jcarousel/"&gt;http://sorgalla.com/jcarousel&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;img id="image12" src="http://sorgalla.com/wp-content/uploads/2006/09/jcarousel.jpg" alt="jCarousel" align="left"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-5446255828676298135?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/5446255828676298135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=5446255828676298135' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/5446255828676298135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/5446255828676298135'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2008/12/great-jquery-plugin.html' title='great jquery plugin '/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-6806542955311150490</id><published>2008-12-13T16:34:00.000-08:00</published><updated>2008-12-13T16:38:07.041-08:00</updated><title type='text'>jquery slideLeft and slideRight</title><content type='html'>To get slideLeft and slideRight effects is a single line:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;1. obj.animate({width:'show'});&lt;br /&gt;2. obj.animate({width:'hide'});&lt;br /&gt;3. obj.animate({width:'toggle'});&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It is so simple and easy but you cannot defined in the core library.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-6806542955311150490?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/6806542955311150490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=6806542955311150490' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/6806542955311150490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/6806542955311150490'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2008/12/jquery-slideleft-and-slideright.html' title='jquery slideLeft and slideRight'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-1771022090012882558</id><published>2008-12-01T20:29:00.001-08:00</published><updated>2008-12-04T22:13:52.640-08:00</updated><title type='text'>Open ID</title><content type='html'>Use Open ID and open_id_authenication in Ruby and Rails project   &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sudo gem install ruby-openid&lt;br /&gt;script/plugin install open_id_authentication&lt;br /&gt;rake -T open_id (To review the open_id related rake tasks)&lt;br /&gt;rake open_id_authentication:db:create&lt;br /&gt;&lt;br /&gt;modify the  ???_open_id_authentication_tables.rb migration file, insert a &lt;br /&gt;   add_column :users, :identify_url, :string&lt;br /&gt;   remove_column :users, identity_url&lt;br /&gt;&lt;br /&gt;rake db:migrate&lt;br /&gt;&lt;br /&gt;in routes.rb&lt;br /&gt;  map.open_id_complete 'session', :controller =&gt; 'session', &lt;br /&gt;      :action =&gt; 'create', :requirements =&gt;  { :method =&gt; :get }&lt;br /&gt;&lt;br /&gt;in user.rb (model)&lt;br /&gt;  attr_accessible :login, :email, :password, :password_confirmation, :identity_url&lt;br /&gt;&lt;br /&gt;in sessions/new.html.erb  (login form)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;&lt;br /&gt;     &lt;label for="openid_url"&gt;OpenID URL&lt;/label&gt;&lt;br/&gt;&lt;br /&gt;     &lt;%= text_field_tag "openid_url" %&gt;&lt;br /&gt;  &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;add code to session_controller.rb&lt;br /&gt;&lt;br /&gt;# session_controller.rb&lt;br /&gt;class SessionController &lt; ApplicationController&lt;br /&gt;  # render new.rhtml&lt;br /&gt;  def new&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  def create&lt;br /&gt;    if using_open_id?&lt;br /&gt;      open_id_authentication(params[:openid_url])&lt;br /&gt;    else&lt;br /&gt;      password_authentication(params[:login], params[:password])&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  def destroy&lt;br /&gt;    self.current_user.forget_me if logged_in?&lt;br /&gt;    cookies.delete :auth_token&lt;br /&gt;    reset_session&lt;br /&gt;    flash[:notice] = "You have been logged out."&lt;br /&gt;    redirect_back_or_default('/')&lt;br /&gt;  end&lt;br /&gt;  &lt;br /&gt;  protected&lt;br /&gt;  &lt;br /&gt;  def open_id_authentication(openid_url)&lt;br /&gt;    authenticate_with_open_id(openid_url, :required =&gt; [:nickname, :email]) do |result, identity_url, registration|&lt;br /&gt;      if result.successful?&lt;br /&gt;        @user = User.find_or_initialize_by_identity_url(identity_url)&lt;br /&gt;        if @user.new_record?&lt;br /&gt;          @user.login = registration['nickname']&lt;br /&gt;          @user.email = registration['email']&lt;br /&gt;          @user.save(false)&lt;br /&gt;        end&lt;br /&gt;        self.current_user = @user&lt;br /&gt;        successful_login&lt;br /&gt;      else&lt;br /&gt;        failed_login result.message&lt;br /&gt;      end&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;  &lt;br /&gt;  def password_authentication(login, password)&lt;br /&gt;    self.current_user = User.authenticate(login, password)&lt;br /&gt;    if logged_in?&lt;br /&gt;      successful_login&lt;br /&gt;    else&lt;br /&gt;      failed_login&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;  &lt;br /&gt;  def failed_login(message = "Authentication failed.")&lt;br /&gt;    flash.now[:error] = message&lt;br /&gt;    render :action =&gt; 'new'&lt;br /&gt;  end&lt;br /&gt;  &lt;br /&gt;  def successful_login&lt;br /&gt;    if params[:remember_me] == "1"&lt;br /&gt;      self.current_user.remember_me&lt;br /&gt;      cookies[:auth_token] = { :value =&gt; self.current_user.remember_token , :expires =&gt; self.current_user.remember_token_expires_at }&lt;br /&gt;    end&lt;br /&gt;    redirect_back_or_default('/')&lt;br /&gt;    flash[:notice] = "Logged in successfully"&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-1771022090012882558?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/1771022090012882558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=1771022090012882558' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/1771022090012882558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/1771022090012882558'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2008/12/open-id.html' title='Open ID'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-6852252546763501493</id><published>2008-12-01T20:26:00.001-08:00</published><updated>2008-12-04T20:44:39.386-08:00</updated><title type='text'>restful_authentication plugin</title><content type='html'>Use restful_authenication plugin in Ruby on Rails project&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;script/plugin source http://svn.techno-weenie.net/projects/plugins/&lt;br /&gt;script/plugin install restful_authentication&lt;br /&gt;script/generate authenticated user sessions&lt;br /&gt;rake db:migrate&lt;br /&gt;&lt;br /&gt;routes.rb&lt;br /&gt;   map.resources :users&lt;br /&gt;   map.resource  :session&lt;br /&gt;   map.signup '/signup', :controller =&gt; 'users', :action =&gt; 'new'&lt;br /&gt;   map.login  '/login', :controller =&gt; 'sessions', :action =&gt; 'new'&lt;br /&gt;   map.logout '/logout', :controller =&gt; 'sessions', :action =&gt; 'destroy'&lt;br /&gt;&lt;br /&gt;application.rb&lt;br /&gt;   # Be sure to include AuthenticationSystem in Application Controller instead&lt;br /&gt;   include AuthenticatedSystem&lt;br /&gt;   before_filter :login_required&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;session_controller.rb&lt;br /&gt;    #  include AuthenticatedSystem (move to application.rb)&lt;br /&gt;     skip_before_filter :login_required, :only =&gt; [ 'new', 'create' ]  &lt;br /&gt;  &lt;br /&gt;users_controller.rb&lt;br /&gt;    #  include AuthenticatedSystem (move to application.rb)&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-6852252546763501493?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/6852252546763501493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=6852252546763501493' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/6852252546763501493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/6852252546763501493'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2008/12/restfulauthentication-plugin.html' title='restful_authentication plugin'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-2316421964300124138</id><published>2008-12-01T14:08:00.001-08:00</published><updated>2008-12-01T14:08:12.096-08:00</updated><title type='text'>TextMate bundle for Ruby on Rails development</title><content type='html'>&lt;br /&gt;&lt;h4&gt;Installation&lt;br /&gt;&lt;/h4&gt;&lt;br /&gt;&lt;pre&gt;cd ~/Library/Application\ Support/Pristine CopyTextMate/Bundles/&lt;br /&gt;git clone git://github.com/drnic/ruby-on-rails-tmbundle.git "Ruby on Rails.tmbundle"&lt;br /&gt;In TextMate: From your drop down menu, select Bundles -&gt; Bundle Editor -&gt; Reload Bundles.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;To update the bundle:&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;cd ~/Library/Application\ Support/Pristine CopyTextMate/Bundles/Ruby\ on\ Rails.tmbundle&lt;br /&gt;git pull&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-2316421964300124138?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/2316421964300124138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=2316421964300124138' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/2316421964300124138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/2316421964300124138'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2008/12/textmate-bundle-for-ruby-on-rails.html' title='TextMate bundle for Ruby on Rails development'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-5065399301694060659</id><published>2008-12-01T12:08:00.001-08:00</published><updated>2008-12-01T21:51:38.913-08:00</updated><title type='text'>Git on Leopard</title><content type='html'>Just have to download and install a nice .dmg package!&lt;br /&gt;&lt;br /&gt;You can grab your copy here : &lt;a href="http://code.google.com/p/git-osx-installer/"&gt;http://code.google.com/p/git-osx-installer/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# commands&lt;br /&gt;git init&lt;br /&gt;git status&lt;br /&gt;git add . -m "initial import"&lt;br /&gt;git commit -a&lt;br /&gt;touch tmp/.gitignore log/.gitignore vendor/.gitignore&lt;br /&gt;&lt;br /&gt;# .gitignore&lt;br /&gt;.DS_Store&lt;br /&gt;log/*.log&lt;br /&gt;tmp/**/*&lt;br /&gt;config/database.yml&lt;br /&gt;db/*.sqlite3&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-5065399301694060659?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/5065399301694060659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=5065399301694060659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/5065399301694060659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/5065399301694060659'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2008/12/git-on-leopard.html' title='Git on Leopard'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31373059.post-582880108018251578</id><published>2008-12-01T12:02:00.001-08:00</published><updated>2008-12-01T12:02:43.637-08:00</updated><title type='text'>Setting Up Your Shell Environment on Leopard</title><content type='html'>You can make your own personal configurations to ~/.bashrc and ~/.bash_profile. As a general rule, things that affect your environment should go in the .bash_profile file and things that affect the shell specifically should go in the .bashrc file.&lt;br /&gt;&lt;br /&gt;The syntax to add a directory to the $PATH is as follows:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;br /&gt;$PATH=/new/directory:/another/new/directory:"${PATH}"&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31373059-582880108018251578?l=recapturing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://recapturing.blogspot.com/feeds/582880108018251578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31373059&amp;postID=582880108018251578' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/582880108018251578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31373059/posts/default/582880108018251578'/><link rel='alternate' type='text/html' href='http://recapturing.blogspot.com/2008/12/setting-up-your-shell-environment-on.html' title='Setting Up Your Shell Environment on Leopard'/><author><name>zopebie</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
