<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>mystcolor.github.com | James Tang's Blog</title>
 <link href="http://mystcolor.github.com/atom.xml" rel="self"/>
 <link href="http://mystcolor.github.com"/>
 <updated>2012-10-31T09:07:31-07:00</updated>
 <id>http://mystcolor.github.com</id>
 <author>
   <name>James Tang</name>
   <email></email>
 </author>

 
 <entry>
   <title>Simplicity isn't simple</title>
   <link href="http://mystcolor.github.com/ux/2012/04/27/simplicity-isnt-simple"/>
   <updated>2012-04-27T00:00:00-07:00</updated>
   <id>hhttp://mystcolor.github.com/ux/2012/04/27/simplicity-isnt-simple</id>
   <content type="html">&lt;p&gt;&lt;a href='http://www.getfinch.com/2012/04/simplicity-isnt-simple/'&gt;Simplicity isn&amp;#8217;t simple&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Remove: Get rid of anything that isn’t essential to the application. This could mean content, too; like the language you use in the navigation labels.&lt;/p&gt;

&lt;p&gt;Organize: Arrange the elements of the interface so that they fit into logical chunks. This might mean based on a person’s mental model (how they think), or tie in to a more familiar interface pattern.&lt;/p&gt;

&lt;p&gt;Hide: Place the most important elements within reach (make them obvious), and hide the others, making them accessible through navigation.&lt;/p&gt;

&lt;p&gt;Displace: Pushing some of the functionality to another device, or feature, so that the one interface isn’t responsible for displaying every possible interaction.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When things are more organized and straight-forward, the effort behind are often less visible.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Participate on an opensource Github project, iOctocat</title>
   <link href="http://mystcolor.github.com/opensource/2012/04/15/ioctocat-enhancement"/>
   <updated>2012-04-15T00:00:00-07:00</updated>
   <id>hhttp://mystcolor.github.com/opensource/2012/04/15/ioctocat-enhancement</id>
   <content type="html">&lt;p&gt;I always love to know whether there are new watchers and forkers for my &lt;a href='http://github.com/mystcolor'&gt;Opensource&lt;/a&gt; projects, even when I&amp;#8217;m on the go. So what I do is to use my iPhone and browse &lt;a href='http://github.com'&gt;github.com&lt;/a&gt; using safari, &lt;strong&gt;the ONLY problem&lt;/strong&gt; is the page just not optimized for mobile experience.&lt;/p&gt;

&lt;p&gt;&lt;code&gt; &amp;gt; There is an app for that!&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Right, the closest official app I found is the &lt;a href='http://itunes.apple.com/hk/app/github-issues/id453833494?mt=8'&gt;Github Issues&lt;/a&gt;, which lets me browse my own repos issues, others issues, just missing the details I wanted to know, &lt;strong&gt;my activity feed&lt;/strong&gt; and &lt;strong&gt;forkers/watchers count&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I tried further to see if there&amp;#8217;s any third party apps for that, and yes there are a few free ones like &lt;a href='http://itunes.apple.com/hk/app/githubby/id413672549?mt=8'&gt;GitHubby&lt;/a&gt;, &lt;a href='http://itunes.apple.com/hk/app/githubview/id441062536?mt=8'&gt;GithubView&lt;/a&gt;, etc, hmm&amp;#8230; can&amp;#8217;t expect too much.&lt;/p&gt;

&lt;p&gt;I was going to start my own Github mobile client, and went to look for some existing API wrappers. A search on the keyword &amp;#8220;github&amp;#8221; brought me to this. &lt;img src='/images/2012-04-15-ioctocat-enhancement/github-screenshot.png' alt='ioctocat' /&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href='http://itunes.apple.com/hk/app/ioctocat/id310429782?mt=8'&gt;iOctocat&lt;/a&gt; is a paid app on App Store, yet open source and welcome contributions. I immediately cloned it from &lt;a href='http://dennisreimann.github.com/ioctocat/'&gt;dennisreimann / ioctocat&lt;/a&gt; and see if it fits my needs&amp;#8230; &lt;strong&gt;Pretty close!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It got the Activity feed I wanted to see, list of repos of a particular user, but those numbers are missing from the list view. &lt;em&gt;(YES I JUST CARE!)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src='/images/2012-04-15-ioctocat-enhancement/numbers.png' alt='numbers' /&gt;&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s &lt;strong&gt;open source&lt;/strong&gt; anyway, I can just patch it :) The code is clean enough for me to find where I should begin working with, so after about an hour of focused work, here I introduce my enhancement on ioctocat.&lt;/p&gt;

&lt;p&gt;&lt;img src='/images/2012-04-15-ioctocat-enhancement/ioctocat-enchanced.png' alt='enhanced' /&gt;&lt;/p&gt;

&lt;p&gt;Thanks for &lt;a href='http://twitter.com/dennisreimann'&gt;Dennis Reimann&lt;/a&gt; for creating this wonderful app, you can find my fork here at &lt;a href='https://github.com/mystcolor/ioctocat'&gt;mystcolor / ioctocat&lt;/a&gt;, and please &lt;a href='http://itunes.apple.com/hk/app/ioctocat/id310429782?mt=8'&gt;support&lt;/a&gt; it from the App Store!&lt;/p&gt;

&lt;h3 id='update_16_apr_2012'&gt;Update: 16 Apr 2012&lt;/h3&gt;

&lt;p&gt;This feature has been merged to the &lt;a href='http://dennisreimann.github.com/ioctocat/'&gt;main repo&lt;/a&gt;, so I expect everyone would see it in the next version of their app release!&lt;/p&gt;

&lt;p&gt;James&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Stretchable images in UIImageView using IB only</title>
   <link href="http://mystcolor.github.com/slides/2012/04/11/stretchable-image-using-ib-only"/>
   <updated>2012-04-11T00:00:00-07:00</updated>
   <id>hhttp://mystcolor.github.com/slides/2012/04/11/stretchable-image-using-ib-only</id>
   <content type="html">&lt;p&gt;So maybe you wonder if there&amp;#8217;s any way to use stretchable images without coding, but using Interface Builder only.&lt;/p&gt;

&lt;p&gt;The problem is there seems to have no option for you to pre-configure your UIImage while you&amp;#8217;re assigning an UIImage in IB, so here is how you can achieve the same thing by assigning the correct property to your UIImageView.&lt;/p&gt;
&lt;div id='__ss_12339589' style='width:425px'&gt; &lt;strong style='display:block;margin:12px 0 4px'&gt;&lt;a href='http://www.slideshare.net/mystcolor/stretchable-images-in-uiimageview-using-ib-only' title='Stretchable images in UIImageView using IB only' target='_blank'&gt;Stretchable images in UIImageView using IB only&lt;/a&gt;&lt;/strong&gt; &lt;iframe marginheight='0' scrolling='no' src='http://www.slideshare.net/slideshow/embed_code/12339589' marginwidth='0' frameborder='0' height='355' width='425'&gt; &lt;/iframe&gt; &lt;div style='padding:5px 0 12px'&gt; View more &lt;a href='http://www.slideshare.net/' target='_blank'&gt;presentations&lt;/a&gt; from &lt;a href='http://www.slideshare.net/mystcolor' target='_blank'&gt;mystcolor&lt;/a&gt; &lt;/div&gt; &lt;/div&gt;
&lt;p&gt;Say goodbye to&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight; &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And you don’t need to use a custom UIView subclass to override the drawRect: method anymore!&lt;/p&gt;

&lt;p&gt;James&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>4 Tips on asking users to rate your app</title>
   <link href="http://mystcolor.github.com/ux/2012/03/22/tips-on-asking-user-to-rate-your-app"/>
   <updated>2012-03-22T00:00:00-07:00</updated>
   <id>hhttp://mystcolor.github.com/ux/2012/03/22/tips-on-asking-user-to-rate-your-app</id>
   <content type="html">&lt;p&gt;&lt;img src='/images/2012-03-22-tips-on-asking-user-to-rate-your-app/rating.png' alt='Ratings' /&gt;&lt;/p&gt;

&lt;p&gt;While an app having a good rating on app store helps promotes the number of downloads, some developers have been pushing too hard or making some mistakes that make their users have less incentive to rate their apps. Here&amp;#8217;s some tips for it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Never blocks the users work-flow.&lt;/strong&gt; If you&amp;#8217;re putting any alert box on app launch, while some libraries like &lt;a href='https://github.com/nicklockwood/iRate'&gt;iRate&lt;/a&gt;, &lt;a href='https://github.com/arashpayan/appirater'&gt;Appirator&lt;/a&gt; make this insanely easy, I&amp;#8217;d still recommend you to disable the app launch event. When I&amp;#8217;m getting things done with your app, you know I&amp;#8217;d click &amp;#8220;No, thanks&amp;#8221;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Try to ask after the user accomplished some task after a few times, like if your app is a photo processing app, ask them after they finished saving the photo.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Understand how the app has been used.&lt;/strong&gt; Ask your users directly and collect some data.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Check the end point of your app using analytics tools, such as &lt;a href='http://www.flurry.com/'&gt;Flurry&lt;/a&gt;. your app and by keeping the first point in mind, add to some critical flow which users actually reach.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Your users know when is the best time for them to give some credits.&lt;/strong&gt; Make sure you have an explict button for them to have easy access to the rate system, the official way is just too cumbersome of anyone.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href='http://twitter.com/lehtimaeki'&gt;Juhani&lt;/a&gt; stated some pretty good suggestions on how to gently remind your users to rate your app at &lt;a href='http://www.androiduipatterns.com/2012/02/how-to-ask-users-to-rate-your-app.html'&gt;How to Ask Users to Rate Your App?&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The most important thing - Make your app awesome.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Remember after your users has rated your app, they are more easy to change their mind and drop a one star rating. Make your app awesome is always the key to win your users heart.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;James&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Pop-Under and Powerslide in iOS</title>
   <link href="http://mystcolor.github.com/ux/2012/03/18/davids-idea"/>
   <updated>2012-03-18T00:00:00-07:00</updated>
   <id>hhttp://mystcolor.github.com/ux/2012/03/18/davids-idea</id>
   <content type="html">&lt;blockquote&gt;
&lt;p&gt;&lt;a href='http://appcubby.com/blog/please-steal-my-ideas/'&gt;Please Steal My Ideas&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A blog post by &lt;a href='http://twitter.com/drbarnard'&gt;David&lt;/a&gt; contains a nice video demonstration on their Wikipedia app built in 2010 (which they&amp;#8217;ve abandoned it), showing off two UX ideas including &lt;strong&gt;Pop-Under&lt;/strong&gt; and &lt;strong&gt;Powerslide&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Using the technique of &lt;strong&gt;Pop-Under&lt;/strong&gt; to avoid moving users away from current context while browsing external links is indeed a good solution, the same concept is exactly indential to the &lt;strong&gt;Folder&lt;/strong&gt; pattern officially introduced by Apple which used to categorize apps at homescreen into folders. An open source project &lt;a href='https://github.com/jwilling/JWFolders'&gt;jwilling / JWFolders&lt;/a&gt; on &lt;a href='http://www.github.com'&gt;Github&lt;/a&gt; has been out for a while to imitate SpringBoard&amp;#8217;s &amp;#8220;folders&amp;#8221;.&lt;/p&gt;

&lt;p&gt;I agreed the one finger horizontal reveal gesture (liked the Path/Sparrow for iOS app) could be easily activated by scrolling through content vertically without intend. But I am afraid the &lt;strong&gt;Powerslide&lt;/strong&gt; which required two fingers horizontal sliding doesn&amp;#8217;t really work for one hand navigation while you&amp;#8217;re on-the-go, and it&amp;#8217;s even harder to discover. Navigation bar only panning gesture recognition like the Facebook app could do the job, or we can simply steeper the panning gesture degree range like under 30 degrees down from which the author mentioned 45 degrees, I think that could be enough to reduce accidental activations.&lt;/p&gt;

&lt;p&gt;Just note that there&amp;#8217;s nothing against David, but because I loved to discuss things :).&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>A note on how Facebook syncs user experience across platforms</title>
   <link href="http://mystcolor.github.com/ux/2012/01/29/a-note-on-how-facebook-syncs-user-experience-across-platforms"/>
   <updated>2012-01-29T00:00:00-08:00</updated>
   <id>hhttp://mystcolor.github.com/ux/2012/01/29/a-note-on-how-facebook-syncs-user-experience-across-platforms</id>
   <content type="html">&lt;p&gt;Facebook has been one of the most popular platform on the web, and their mobile team are also working so hard to ensure everyone can have a great Facebook experience. Since the introduce of Facebook app v4.0, I think they made something worths me a second mention for their effort.&lt;/p&gt;

&lt;h2 id='the_shared_navigation_sidebar_experience'&gt;The shared navigation sidebar experience&lt;/h2&gt;

&lt;p&gt;No matter on Facebook&amp;#8217;s desktop webpage, mobile page, and the mobile apps, we see the same navigation sidebar style.&lt;/p&gt;

&lt;p&gt;&lt;img src='/images/2012-01-29-a-note-on-how-facebook-syncs-user-experience-across-platforms/facebook-web-mobile-sidebar.png' alt='Facebook sidebar' /&gt;&lt;/p&gt;

&lt;p&gt;And better yet their sidebar items syncs both ways on the mobile app and web, and you can directly edit your favourite list on v4.1 iOS mobile app.&lt;/p&gt;

&lt;h2 id='the_popover_access_to_friend_requestmessagesnotification_on_v41'&gt;The popover access to Friend request/Messages/Notification on v4.1&lt;/h2&gt;

&lt;p&gt;&lt;img src='/images/2012-01-29-a-note-on-how-facebook-syncs-user-experience-across-platforms/facebook-popover.png' alt='Facebook popover' /&gt;&lt;/p&gt;

&lt;p&gt;If you&amp;#8217;re an iOS developer, you&amp;#8217;d know that the &lt;a href='http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/cl/UIPopoverController'&gt;UIPopoverController&lt;/a&gt; is only available for the iPad SDK, and the Facebook mobile team took the hard path to build their own (or maybe not ;P), they still go for futher unifying the whole user experience across different platforms.&lt;/p&gt;

&lt;p&gt;One thing to note is the those list of messages and requests on the app is cached after the first time access, (which you can try to scroll down to load the second page, and re-open the popup again to find page two doesn&amp;#8217;t need to be load again). And it would be even better if the scrolling offset could be remembered as well.&lt;/p&gt;

&lt;h2 id='the_chat_list_on_the_same_right_hand_side_only_when_theres_enough_screen_width'&gt;The chat list, on the same right hand side, only when there&amp;#8217;s enough screen width&lt;/h2&gt;

&lt;p&gt;&lt;img src='/images/2012-01-29-a-note-on-how-facebook-syncs-user-experience-across-platforms/facebook-chatlist.png' alt='Facebook chatlist' /&gt;&lt;/p&gt;

&lt;p&gt;This could matter to someone whom are serious Facebook chatter.&lt;/p&gt;

&lt;h2 id='conclusion'&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;The above is just the part of the features that the Facebook team offers to their users, there are more like the new &lt;a href='http://www.facebook.com/notes/facebook-mobile/introducing-facebook-for-ipad/240833529299007'&gt;Bigger, better photos&lt;/a&gt; on the iPad app, the new &lt;a href='http://blog.facebook.com/blog.php?post=10150408335607131'&gt;Timeline layout&lt;/a&gt; available for mobile access, etc.&lt;/p&gt;

&lt;p&gt;I really appreciate for their work and attempt to unify all user experience, for the same service across different platform, which we could have equally good product no matter where we are.&lt;/p&gt;

&lt;h2 id='open_source'&gt;Open Source&lt;/h2&gt;

&lt;p&gt;If you&amp;#8217;re interested on how to create the &lt;a href='http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/cl/UIPopoverController'&gt;UIPopoverController&lt;/a&gt; layout on iPhone, you could check out my &lt;a href='http://bit.ly/ytOgQD'&gt;iPhone compatible UIPopoverController implementation bit.ly bundle&lt;/a&gt; for some open source projects on &lt;a href='http://github.com'&gt;github.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And there&amp;#8217;re also some really good list of &lt;a href='http://bit.ly/t5XkS2'&gt;iOS Open Source Facebook/Path liked Sidebar Menu implementation&lt;/a&gt; also hosted on &lt;a href='http://github.com'&gt;github.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know if you think there&amp;#8217;s any other apps that worths some more attention, and you can also find me on twitter!&lt;/p&gt;

&lt;p&gt;James&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>The real benefits on using Facebook/Path liked sidebar navigation in iOS apps</title>
   <link href="http://mystcolor.github.com/ux/2012/01/02/the-real-benefits-on-using-facebook-or-path-liked-sidebar-navigation-in-iOS-apps"/>
   <updated>2012-01-02T00:00:00-08:00</updated>
   <id>hhttp://mystcolor.github.com/ux/2012/01/02/the-real-benefits-on-using-facebook-or-path-liked-sidebar-navigation-in-iOS-apps</id>
   <content type="html">&lt;p&gt;&lt;img src='/images/2012-01-02-the-real-benefits-on-using-facebook-or-path-liked-sidebar-navigation-in-iOS-apps/path_facebook.png' alt='Path and Facebook' /&gt;&lt;/p&gt;

&lt;p&gt;We don&amp;#8217;t have an official name for it, so I will called it the &amp;#8220;Sidebar&amp;#8221; at this moment.&lt;/p&gt;

&lt;p&gt;The &amp;#8220;Sidebar&amp;#8221; navigation isn&amp;#8217;t something that provided by the official SDK. Is it worth to spend time and effort to follow this trend and forget about common solutions, like the UITabBar or the old Facebook style dashboard launcher?&lt;/p&gt;

&lt;p&gt;Before, we already have similar discussions as the &lt;a href='http://ux.stackexchange.com/questions/6584/iphone-app-tab-bar-vs-dashboard-aka-grid-navigation-or-both'&gt;iPhone App: Tab Bar vs. Dashboard (aka Grid Navigation). Or both?&lt;/a&gt; thread, and now the &amp;#8220;Sidebar&amp;#8221; is definately a new player.&lt;/p&gt;

&lt;p&gt;First, let us have a quick remind on the original UITabBar and the Facebook dashboard launcher.&lt;/p&gt;

&lt;h2 id='uitabbar'&gt;UITabBar&lt;/h2&gt;

&lt;p&gt;&lt;img src='/images/2012-01-02-the-real-benefits-on-using-facebook-or-path-liked-sidebar-navigation-in-iOS-apps/music.png' alt='UITabBar in Music app' /&gt;&lt;/p&gt;

&lt;p&gt;The problem of using the UITabBar is that it&amp;#8217;s always there no matter the user needs it or not, which is waste of screen pixels especially on the iPhone and the iPod touch.&lt;/p&gt;

&lt;p&gt;Another property is that assigning more than 5 view controllers to the UITabBarController would collapse the last tab into a &amp;#8220;More&amp;#8221; tab, which some may think it complicates the application hierachy.&lt;/p&gt;

&lt;h2 id='dashboard_launcher_facebook_app'&gt;Dashboard Launcher (Facebook app)&lt;/h2&gt;

&lt;p&gt;&lt;img src='/images/2012-01-02-the-real-benefits-on-using-facebook-or-path-liked-sidebar-navigation-in-iOS-apps/facebook.jpg' alt='Old Facebook' /&gt;&lt;/p&gt;

&lt;p&gt;Using the dashboard, we gain back the precious screen spaces while the dashboard is only there when the app launches or until the user returns back to the main page.&lt;/p&gt;

&lt;p&gt;However, some suggested it could still be insufficient even we got 9 icons at a page, and once it requires user to swipe between pages, it is not really much better than comparing with the &amp;#8220;More&amp;#8221; tab.&lt;/p&gt;

&lt;h2 id='why_using_the_sidebar'&gt;Why using the &amp;#8220;Sidebar&amp;#8221;?&lt;/h2&gt;

&lt;p&gt;Unlike the above approaches, that users would expect as simple as to see a new view controller, the &amp;#8220;Sidebar&amp;#8221; can provide a lot more info while presenting list of options, including pushing a new view controller, categories, browsing submenus, and even custom user actions, etc.&lt;/p&gt;

&lt;p&gt;&lt;img src='/images/2012-01-02-the-real-benefits-on-using-facebook-or-path-liked-sidebar-navigation-in-iOS-apps/facebook_sidebar_navigation.png' alt='Facebook Sidebar Navigation' /&gt; &lt;img src='/images/2012-01-02-the-real-benefits-on-using-facebook-or-path-liked-sidebar-navigation-in-iOS-apps/path_sidebar_action.png' alt='Path Sidebar Actino' /&gt;&lt;/p&gt;

&lt;p&gt;Consider the flexibility on using the &amp;#8220;Sidebar&amp;#8221;, custom accessory view, selected indexPath indication, section header and footer for descriptions, basically all goodies from using a UITableView.&lt;/p&gt;

&lt;h2 id='conclusion'&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;The default UITabBar is definately good for situation that the tab bar is needed to be always there. But if you think you needed more screen estate, maybe you&amp;#8217;d now really consider using the &amp;#8220;Sidebar&amp;#8221; for navigation.&lt;/p&gt;

&lt;h2 id='open_source'&gt;Open Source&lt;/h2&gt;

&lt;p&gt;Since we don&amp;#8217;t have an official implementation for it, maybe you&amp;#8217;d like to checkout the few open source library on Github that aimed to provide this function, including my own implementation &lt;a href='http://bitly.com/uOeTc0'&gt;JTRevealSidebarV2&lt;/a&gt; or others good work in &lt;a href='http://bitly.com/t5XkS2'&gt;my bit.ly bundle&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let me know what you think!&lt;/p&gt;

&lt;p&gt;James&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>My first github blog</title>
   <link href="http://mystcolor.github.com/2011/12/30/my-first-github-blog"/>
   <updated>2011-12-30T00:00:00-08:00</updated>
   <id>hhttp://mystcolor.github.com/2011/12/30/my-first-github-blog</id>
   <content type="html">&lt;p&gt;Using github for blogging sounds cool to me. Will be trying to post something useful here starting in 2012!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>NSStringf. Simpler printf styled +[NSString stringWithFormat:]</title>
   <link href="http://mystcolor.github.com/ioscodesnippet/2011/08/27/nsstringf-simpler-printf-styled-nsstring-stringwithformat"/>
   <updated>2011-08-27T00:00:00-07:00</updated>
   <id>hhttp://mystcolor.github.com/ioscodesnippet/2011/08/27/nsstringf-simpler-printf-styled-nsstring-stringwithformat</id>
   <content type="html">&lt;p&gt;If you thinks that +[NSString stringWithFormat:] is simply annoying.&lt;/p&gt;

&lt;p&gt;If you missed the C style string formatter like printf() or NSLog().&lt;/p&gt;

&lt;p&gt;[NSString stringWithFormat:@&amp;#8221;Why should I type this long?&amp;#8221;];&lt;/p&gt;
&lt;script src='https://gist.github.com/1578509.js?file=JTStringAddition.h'&gt; &lt;/script&gt;&lt;script src='https://gist.github.com/1578509.js?file=JTStringAddition.m'&gt; &lt;/script&gt;
&lt;p&gt;NSStringf(@&amp;#8221;It&amp;#8217;s just so much easier. %@&amp;#8221;, @&amp;#8221;Really.&amp;#8221;);&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Rendering any UIViews into UIImage in one line</title>
   <link href="http://mystcolor.github.com/ioscodesnippet/2011/08/25/rendering-any-uiviews-into-uiimage-in-one-line"/>
   <updated>2011-08-25T00:00:00-07:00</updated>
   <id>hhttp://mystcolor.github.com/ioscodesnippet/2011/08/25/rendering-any-uiviews-into-uiimage-in-one-line</id>
   <content type="html">&lt;p&gt;Looks like you&amp;#8217;d like to make some snapshots of your application, or maybe capturing partial UI elements on the screen for caching or saving? You can achieve this in just one single line like this.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;UIImage *viewSnapshot = [myView toImage];&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Add this UIView+JTViewToImage category to your project, and you&amp;#8217;ll also needed to link &amp;#60;QuartzCore/QuartzCore.h&amp;#62; framework too.&lt;/p&gt;
&lt;script src='https://gist.github.com/1578446.js?file=UIView%2BJTViewToImage.h'&gt; &lt;/script&gt;&lt;script src='https://gist.github.com/1578446.js?file=UIView%2BJTViewToImage.m'&gt; &lt;/script&gt;
&lt;p&gt;In advance, if you want to make sure you&amp;#8217;ve the exact size of the static image output, try this line instead.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;UIImage *viewSnapshot = [myView toImageWithScale:1];&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will tell your app to ignore the screen scale and simply reference to the size of the view bounds.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Loading a Nib file programmatically using NSObject category</title>
   <link href="http://mystcolor.github.com/ioscodesnippet/2011/08/22/loading-a-nib-file-programmatically-using-nsobject-category"/>
   <updated>2011-08-22T00:00:00-07:00</updated>
   <id>hhttp://mystcolor.github.com/ioscodesnippet/2011/08/22/loading-a-nib-file-programmatically-using-nsobject-category</id>
   <content type="html">&lt;p&gt;Maybe you&amp;#8217;ve an IB created uitableviewcell.xib, or some kind of uiview.xib wanted to load to your code-based view controller, and you come out finding it&amp;#8217;s not that straight forward just to do this simple job according to the official &lt;a href='http://developer.apple.com/library/ios/#
documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html'&gt;Resource Programming Guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Isn&amp;#8217;t it ideal to load a nib file using one line like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;MyTableViewCell *cell = [MyTableViewCell objectWithNibNamed:@&amp;quot;MyTableViewCellNibName&amp;quot;];&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Add this NSObject category make this possible&lt;/p&gt;
&lt;script src='https://gist.github.com/1578429.js?file=NSObject%2BJTNibLoader.h'&gt; &lt;/script&gt;&lt;script src='https://gist.github.com/1578429.js?file=NSObject%2BJTNibLoader.m'&gt; &lt;/script&gt;
&lt;p&gt;Easy enough?&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Creating a placeholder UIImage dynamically with color</title>
   <link href="http://mystcolor.github.com/ioscodesnippet/2011/08/22/creating-a-placeholder-uiimage-dynamically-with-color"/>
   <updated>2011-08-22T00:00:00-07:00</updated>
   <id>hhttp://mystcolor.github.com/ioscodesnippet/2011/08/22/creating-a-placeholder-uiimage-dynamically-with-color</id>
   <content type="html">&lt;p&gt;Ever needed a placeholder color for your lazy loaded table view cell image view? Typically can create a 1x1 pixel image in PhotoShop, add it to your project, then load it with UIImageNamed. Can&amp;#8217;t imagine how lots of effort and steps, and if the placeholder color are requested to be updated, you&amp;#8217;d have to repeat the process all over again.&lt;/p&gt;

&lt;p&gt;If you needed work with this kind of situations a lot, lets do it programmatically and DRY! Consider the following UIImage+JTColor category.&lt;/p&gt;
&lt;script src='https://gist.github.com/1571875.js?file=UIImage%2BJTColor.h'&gt; &lt;/script&gt;&lt;script src='https://gist.github.com/1571875.js?file=UIImage%2BJTColor.m'&gt; &lt;/script&gt;
&lt;p&gt;Usage:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#import &amp;quot;UIImage+JTColor.h&amp;quot;

UIColor *color = [UIColor lightGrayColor];   // Or your whatever UIColor
imageView.image = [UIImage imageWithColor:color];&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Nothing magical but will saves you a lot of time.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Cancelable Scheduled Blocks in Objective-C</title>
   <link href="http://mystcolor.github.com/ioscodesnippet/2011/08/20/cancelable-scheduled-blocks-in-objective-c"/>
   <updated>2011-08-20T00:00:00-07:00</updated>
   <id>hhttp://mystcolor.github.com/ioscodesnippet/2011/08/20/cancelable-scheduled-blocks-in-objective-c</id>
   <content type="html">&lt;p&gt;Sometimes you&amp;#8217;d really want to perform a delayed action for your apps. We&amp;#8217;ll create a category on NSObject to provide a really handy usage.&lt;/p&gt;

&lt;p&gt;The best thing with this snippet is your scheduled operations are cancelable, so you can choose to only perform your latest triggered operation (e.g. for your table view cells maybe?)&lt;/p&gt;
&lt;script src='https://gist.github.com/1571800.js?file=NSObject%2BJTCancelableScheduledBlock.h'&gt; &lt;/script&gt;&lt;script src='https://gist.github.com/1571800.js?file=NSObject%2BJTCancelableScheduledBlock.m'&gt; &lt;/script&gt;
&lt;p&gt;Usage:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[self performBlock:^(void) {
     NSLog(@&amp;quot;delayed operation!&amp;quot;);
} afterDelay:2];&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Handy right?&lt;/p&gt;

&lt;p&gt;You may also interest about how others doing in alternative ways.&lt;/p&gt;

&lt;p&gt;&lt;a href='http://forrst.com/posts/Delayed_Blocks_in_Objective_C-0Fn'&gt;Delayed Blocks in Objective-C&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href='http://atastypixel.com/blog/easy-delayed-messaging-using-nsproxy-and-nsinvocation/'&gt;Easy Delayed Messaging using NSProxy and NSInvocation&lt;/a&gt;&lt;/p&gt;</content>
 </entry>
 
 
</feed>