<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace V5 Site Server v5.13.159 (http://www.squarespace.com) on Sun, 26 May 2013 03:02:10 GMT--><feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"><title>Blog</title><subtitle>Blog</subtitle><id>http://remarkablepixels.com/blog/</id><link rel="alternate" type="application/xhtml+xml" href="http://remarkablepixels.com/blog/"/><link rel="self" type="application/atom+xml" href="http://remarkablepixels.com/blog/atom.xml"/><updated>2011-11-07T18:01:00Z</updated><generator uri="http://five.squarespace.com/" version="Squarespace V5 Site Server v5.13.159 (http://www.squarespace.com)">Squarespace</generator><entry><title>Text Input in UIAlertViews</title><category term="UIAlertView"/><category term="ios"/><category term="ios 5"/><id>http://remarkablepixels.com/blog/2011/11/7/text-input-in-uialertviews.html</id><link rel="alternate" type="text/html" href="http://remarkablepixels.com/blog/2011/11/7/text-input-in-uialertviews.html"/><author><name>Adam</name></author><published>2011-11-07T18:01:00Z</published><updated>2011-11-07T18:01:00Z</updated><summary type="html" xml:lang="en-US"><![CDATA[New methods in iOS5 to allow the user to input text into UIAlertViews.]]></summary></entry><entry><title>Simple ARC explanation</title><category term="ARC"/><category term="Xcode"/><category term="ios"/><id>http://remarkablepixels.com/blog/2011/10/25/simple-arc-explanation.html</id><link rel="alternate" type="text/html" href="http://remarkablepixels.com/blog/2011/10/25/simple-arc-explanation.html"/><author><name>Adam</name></author><published>2011-10-26T01:21:20Z</published><updated>2011-10-26T01:21:20Z</updated><content type="html" xml:lang="en-US"><![CDATA[<p><span class="thumbnail-image-block ssNonEditable"><span><a href="javascript:showFullImage('/display/ShowImage?imageUrl=%2Fstorage%2Fios_51.jpg%3F__SQUARESPACE_CACHEVERSION%3D1319679519466',224,500);"><img src="http://remarkablepixels.com/storage/ios5.png?__SQUARESPACE_CACHEVERSION=1319679749019" alt="" /></a></span></span></p>
<p>Dont worry about it. &nbsp;Memory management is one of the hardest concepts for new developers to wrap their heads around. With iOS 5 and ARC this issue is mitigated.</p>
<p>Developers can alloc and init objects like they normally would, but now the compiler takes care of cleaning up memory when the object is no longer needed. &nbsp;In other words, stop worrying about it, you no longer need to be obsessive about writting a release everytime you write alloc. In fact you can remove dealloc functions from your code altogether. &nbsp;This even works for Blocks, stop worrying about including the autorelease.</p>
<p>There is even an automated way to convert old code to ARC, within Xcode go to Edit --&gt; Refactor --&gt; Convert to Objective-C ARC. This will walk you through step by step how to convert your code and even do a precheck to make sure nothing will break.</p>
<p>There are also compiler flags you can provide to opt-in or opt-out of ARC. &nbsp;This is incredibly useful if you are using pre-ARC libraries, so you can have ARC on the rest of the project and use retain/release on the older code.</p>
<p>Opt-in Flag = -fobjc-arc</p>
<p>Opt-out Flag = -fno-objc-arc</p>
<p>&nbsp;</p>
<p>Apple's initial baselines also are showing that there is a healthy performance gain of 2.5x faster than a normal retain/release. &nbsp;It is 6x faster than autorelease as well.</p>
<p>Stop Worrying. Start Developing.</p>]]></content></entry><entry><title>iOS Twitter Search Tutorial</title><id>http://remarkablepixels.com/blog/2011/5/19/ios-twitter-search-tutorial.html</id><link rel="alternate" type="text/html" href="http://remarkablepixels.com/blog/2011/5/19/ios-twitter-search-tutorial.html"/><author><name>Adam</name></author><published>2011-05-19T15:16:17Z</published><updated>2011-05-19T15:16:17Z</updated><content type="html" xml:lang="en-US"><![CDATA[<p><span class="full-image-block ssNonEditable"><span><img style="width: 600px;" src="http://remarkablepixels.com/storage/twitterSearch.jpg?__SQUARESPACE_CACHEVERSION=1305825513601" alt="" /></span></span></p>
<p>One of the most popular blog entries at RemarkablePixels is an entry I wrote back in December called <a href="http://remarkablepixels.com/blog/2010/12/20/parsing-json-in-ios-the-right-way.html">Parsing JSON in iOS the right way</a>. &nbsp;Very frequently when people are asking me about parsing JSON they are usually talking about something related to Twitter, commonly the Twitter Search API.</p>
<p>The Twitter Search API is a very straightforward and powerful API, provided by Twitter to allow developers to get realtime search results. &nbsp;The resultset from these queries is very robust and contains lots of useful information besides just the text and username of a tweet. &nbsp;This is presented back to the developer in a JSON wrapper for easy parsing. &nbsp;Luckily iOS has a great framework for handling JSON data and asynchronous HTTP requests.</p>
<p>Lets get started...The project and source code is available on <a href="https://github.com/Adam0101/Simple-Twitter-Search">GitHub</a> if you would rather see everything together. Otherwise follow along below...</p>
<p>Create a new project in XCode, a View-based App.</p>
<p>Download the JSON framework for iOS on GitHub - <a href="http://stig.github.com/json-framework/">Here</a>&nbsp;</p>
<p>Drag the JSON files into your project.</p>
<p>This simple example will include 3 pieces. A view controller to control the flow, a Search Twitter class, and a View to present the results.</p>
<p>Lets start with the heavy lifting first, the Search Twitter class. &nbsp;Add a new Objective C class to your project and name it SearchTwitter. &nbsp;</p>
<p>We will first populate our header with one instance variable and one method we need to search twitter.</p>
<p><script src="https://gist.github.com/981038.js?file=searchTwitter.h"></script></p>
<p>The Search Twitter class will take one input, an NSString from our first view controller, which is the term that the user would like to search twitter for. &nbsp;We will also need to sanitize this input to substitute any white space in the search term or other characters that are common, but will break the API call. &nbsp;This is easily handled with a couple of NSRegularExpressions and stringByReplacingMatchesInString functions. &nbsp;</p>
<p><script src="https://gist.github.com/981063.js?file=sanitize.m"></script></p>
<p>Once we have passed through our sanitizer, we then need to create a URL string for the Twitter Search API which will include our search term and the number of results we would like to receive. &nbsp;We then take this NSString and create an NSURL object which we can use in our next step to retreive the results of this call.</p>
<p><script src="https://gist.github.com/981066.js?file=urlsetup.m"></script></p>
<p>We then make an asynchronous call with the NSURL object created to start retreiving the results of the search.</p>
<p><script src="https://gist.github.com/981074.js?file=dltweets.m"></script></p>
<p>Now that our search is in flight, we need a way to catch the JSON results as they come back. &nbsp;As I wrote <a href="http://remarkablepixels.com/blog/2010/12/20/parsing-json-in-ios-the-right-way.html">previously</a>, you cannot just take the first set of data that comes back, otherwise you can end up an invalid JSON resultset. &nbsp;To handle this we will implement the NSURLConnection delegate methods, connection didReceiveData and connectionDidFinishLoading.</p>
<p>With connection didReceiveData we need to allocate our tweetBlob on the first pass, and then on every subsequent call, append the data to this blob.</p>
<p><script src="https://gist.github.com/981105.js?file=connectionDidReceiveData.m"></script></p>
<p>Once all the data has finished downloading the connectionDidFinishLoading will be called. &nbsp;In here we will want to take the completed blob of JSON tweets and put it through the JSON parser. &nbsp;We also need a way to signal back to our view that the request has completed, successfully or unsuccessfully. &nbsp;To do this we will send a notification using NSNotificationCenter, and then setup a listener on our view to receive the dictionary of results.</p>
<p><script src="https://gist.github.com/981156.js?file=gotem.m"></script></p>
<p>&nbsp;Now that we have finished the implementation of the searchTwitter class, we can move on to our view controller and view.</p>
<p>The view controller is pretty straightforward, we will create three instance variables, one for our SearchTwitter class, and two IBOutlets for our search view.</p>
<p><script src="https://gist.github.com/981174.js?file=simpleTwitterViewController.h"></script></p>
<p>The implementation consists of three pieces, the allocation of our SearchTwitter class, the handling of receiving the search term, and then pushing our results view onto the view stack.</p>
<p><script src="https://gist.github.com/981177.js?file=simpleTwitterViewController.m"></script></p>
<p>&nbsp;</p>
<p>The last piece of the puzzle is the tableview that will present our results. &nbsp;The header file is one simple piece an NSMutableArray that we will use to populate the rows in our table view.</p>
<p><script src="https://gist.github.com/981196.js?file=SearchResults.h"></script></p>
<p>Within the implementation we need to now setup the NSNotification center to listen for the tweets results, and then handle the data that comes in.</p>
<p><script src="https://gist.github.com/981198.js?file=notificationsTweetResults.m"></script></p>
<p>The last step is to implement the tableview methods to populate our data in the cells.</p>
<p><script src="https://gist.github.com/981200.js?file=FilltheCells.m"></script></p>
<p>&nbsp;</p>
<p>Thats it we are done. &nbsp;You should now have a simple example of how to implement the Twitter Search API in iOS. &nbsp;</p>
<p><a href="First public GitHub Repository. https://github.com/Adam0101/Simple-Twitter-Search  Blog entry for this will be coming shortly.">Download this example project on GitHub.</a></p>]]></content></entry><entry><title>Chameleon - UIKit for OS X</title><category term="chameleon"/><category term="ios"/><category term="os x"/><category term="uikit"/><id>http://remarkablepixels.com/blog/2011/3/22/chameleon-uikit-for-os-x.html</id><link rel="alternate" type="text/html" href="http://remarkablepixels.com/blog/2011/3/22/chameleon-uikit-for-os-x.html"/><author><name>Adam</name></author><published>2011-03-22T18:54:32Z</published><updated>2011-03-22T18:54:32Z</updated><content type="html" xml:lang="en-US"><![CDATA[<p><span class="full-image-block ssNonEditable"><span><img src="http://remarkablepixels.com/storage/sec-cham.gif?__SQUARESPACE_CACHEVERSION=1300820997179" alt="" /></span></span></p>
<p>With the success of Apps on the Mac App store, such as <a href="http://www.pixelmator.com/weblog/2011/01/25/pixelmator-grosses-1-million-on-the-mac-app-store/">Pixelmator</a>, many devs are sizing up how they can port their existing apps over to OS X. &nbsp;Today with the release of <a href="http://chameleonproject.org/">Chameleon</a>, developers now have the ability to port their existing iOS code directly to OS X. &nbsp;Chameleon is a byproduct from IconFactory, as they created this framework while porting Twitterific to allow for a direct port from iOS into OS X. &nbsp;</p>
<p>Chameleon is definately a work in progress, with 60% of UIKit having been ported so far. &nbsp;There are some notable missing parts of UIKit, such as the UITabBar and UISwitch.</p>
<p>Historically the mantra of write once, run everywhere has yielded some poor products, but I'm interested to see how I can leverage Chameleon and specifically how well that will perform on OS X.</p>
<p><a href="https://github.com/BigZaphod/Chameleon">Chameleon on GitHub</a></p>
<p><a href="https://store.iconfactory.com/#chameleon">Support Chameleon via Donation</a></p>]]></content></entry><entry><title>Chrome extensions for iOS Developers</title><category term="chrome"/><category term="extensions"/><category term="ios"/><id>http://remarkablepixels.com/blog/2011/3/6/chrome-extensions-for-ios-developers.html</id><link rel="alternate" type="text/html" href="http://remarkablepixels.com/blog/2011/3/6/chrome-extensions-for-ios-developers.html"/><author><name>Adam</name></author><published>2011-03-06T18:41:29Z</published><updated>2011-03-06T18:41:29Z</updated><content type="html" xml:lang="en-US"><![CDATA[<p><span class="full-image-block ssNonEditable"><span><img src="http://remarkablepixels.com/storage/Screen%20shot%202011-03-06%20at%202.52.19%20PM.png?__SQUARESPACE_CACHEVERSION=1299510886982" alt="" /></span></span></p>
<p>I switched from Safari to Chrome a few months ago and have enjoyed the speed improvements and the many useful extensions. &nbsp;Although being an iOS developer there are some things that do not work as well in Chrome as they did in Safari.</p>
<p>The first is iTunes Connect. &nbsp;When accessing the Sales reports in iTunes Connect from Chrome, you will see the loading spinner, just spin and spin. &nbsp;After a few refreshes you can finally get the report to come through. &nbsp;This can be frustrating as this is the only source of information for developers on how many apps have been downloaded. &nbsp;Luckily there is an extension called <a href="https://chrome.google.com/extensions/detail/olcmimpceehliglonceahbidlfmajpoo?hl=en">iTunes Connect fix</a>&nbsp;which fixes this problem. &nbsp;Just install this extension and the reports load immediately just like Safari.</p>
<p>The second is searching for developer documentation within Chrome. &nbsp;There is a great shortcut extension that will let you search directly within Chrome for content within the iOS and Mac documentation. &nbsp;<a href="https://github.com/tylerhall/AppleDocsChromeExtension">AppleDocsChrome</a> will help speed up your search results and makes finding documentation content even easier.</p>
<p>Another great extension is the <a href="https://chrome.google.com/extensions/detail/eihamakmjaglnlcjhggpbhdfgpnpdhmj?hl=en">AppStore Instant Extension</a> which allows you to get Google Instant like search results from the AppStore.</p>]]></content></entry><entry><title>Get App Store Reviews with 1 line of code</title><category term="App Store"/><category term="app store reviews"/><category term="github"/><category term="ios"/><category term="iphone"/><category term="reviews"/><id>http://remarkablepixels.com/blog/2011/2/21/get-app-store-reviews-with-1-line-of-code.html</id><link rel="alternate" type="text/html" href="http://remarkablepixels.com/blog/2011/2/21/get-app-store-reviews-with-1-line-of-code.html"/><author><name>Adam</name></author><published>2011-02-21T20:20:29Z</published><updated>2011-02-21T20:20:29Z</updated><content type="html" xml:lang="en-US"><![CDATA[<p>With over 350,000+ apps in the Apple App store, getting your app noticed is becoming more and more difficult. &nbsp;There have been many different approaches to solving the App discovery problem, but even with these solutions they all depend on one common factor, Reviews. &nbsp;What makes this even more of a difficult problem is getting your users to the App store in a happy and willing state to perform a review. &nbsp;Apple finally got rid of the awful idea of prompting to review an App at the point of uninstall, which was notorious for generating high levels of bad reviews for apps. &nbsp;Who is happy with an App that they are removing?</p>
<p>The best approach that I have seen apps take so far is to politely ask for a review at different times in the application. &nbsp;This is best done after the user has used the app over time, and ideally after a positive experience in the app. &nbsp;A good example would be to ask for a review after a user unlocked an achievement. &nbsp;The logic would be that they are in a happy state as a result of their achievement, so would be more likely to review your app.</p>
<p>Nick Lockwood from <a href="http://charcoaldesign.co.uk">Charcoal Design</a> has taken a lot of the pain out of this process for developers. &nbsp;He has published a simple class, iRate, that can be used in any iOS app to prompt app users to review the app. &nbsp;It is incredibly simple to get this code working with your existing app. &nbsp;Using the default configuration you can have this code up and running in your application in as little as one line of code.</p>
<p>First download the class from GitHub <a href="https://github.com/demosthenese/iRate">here</a>.&nbsp;</p>
<p>Second import the iRate class into your project.</p>
<p>Third add the following line to your App Delegate code with the App Store Id for your app.</p>
<p><script src="https://gist.github.com/837795.js?file=iRateExample.m"></script></p>
<p>Thats it! &nbsp;Now there are many great options you can use to customize the appearance, and when to have the review prompt displayed, but if you leave it at the default settings it will work fine also. &nbsp;I would encourage you to read the documentation over at <a href="https://github.com/demosthenese/iRate">GitHub</a> to see the many options you can use.</p>]]></content></entry><entry><title>Top 4 Debugging Tips</title><category term="debugging"/><category term="developers"/><id>http://remarkablepixels.com/blog/2011/2/8/top-4-debugging-tips.html</id><link rel="alternate" type="text/html" href="http://remarkablepixels.com/blog/2011/2/8/top-4-debugging-tips.html"/><author><name>Adam</name></author><published>2011-02-08T10:59:00Z</published><updated>2011-02-08T10:59:00Z</updated><content type="html" xml:lang="en-US"><![CDATA[<div>These are the top 4 general debugging tips that I have used in my development across multiple languages, and are not specific to any one language but instead just general ideas.</div>
<ol>
<li>Track your changes - keep a log of all of the things you have changed and tried while debugging this problem. &nbsp;This way when you finally swallow your ego and decide to ask for help, you can give that person this full list of everything that has already been tried and shorten their debugging cycle. If your going to be posting your question to a site like <a href="http://www.stackoverflow.com">StackOverflow</a> this gives valuable information to the people trying to answer your question and gives your post a much higher quality, which should translate into higher quality answers.&nbsp;Creating this list will also allow you to avoid repeating the same steps over and over again while debugging.</li>
<li>Don't Trust Comments - Read your code. Comments should be a guide/reminder as to what the code <em>should </em>be doing, but comments are not code, they cant actually do the work. You need to read and walk through your code to actually debug a problem. &nbsp;This is especially true when reading other people's code.</li>
<li>Get Help - Talk to someone. Post a question to StackOverflow or <a href="http://remarkablepixels.com/blog/2011/1/5/the-best-question-is-the-one-never-asked.html">dont</a>. &nbsp;The act of explaining your code forces you to reevaluate your logic.&nbsp;</li>
<li>Walk Away - Get away from the code, take a walk, get something to eat and then come back to the problem with a clear head. &nbsp;Pounding away at a problem can force you to be very narrow in your analysis but stepping away from the computer and just thinking about something else can help you reevaluate the problem as the bigger picture.</li>
</ol>
<p><em>Post inspired by the teachings of <a href="http://en.wikipedia.org/wiki/John_Guttag">John Guttag</a>.</em></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content></entry><entry><title>Why I'm spending more time in the Forrst</title><category term="design"/><category term="developers"/><category term="forrst"/><category term="social"/><id>http://remarkablepixels.com/blog/2011/2/1/why-im-spending-more-time-in-the-forrst.html</id><link rel="alternate" type="text/html" href="http://remarkablepixels.com/blog/2011/2/1/why-im-spending-more-time-in-the-forrst.html"/><author><name>Adam</name></author><published>2011-02-01T16:00:06Z</published><updated>2011-02-01T16:00:06Z</updated><content type="html" xml:lang="en-US"><![CDATA[<p><span class="full-image-block ssNonEditable"><span><a href="http://remarkablepixels.com/display/admin/www.forrst.com"><img style="width: 450px;" src="http://remarkablepixels.com/storage/Screen%20shot%202011-01-31%20at%209.32.19%20PM.png?__SQUARESPACE_CACHEVERSION=1296527647400" alt="" /></a></span></span>With the recent splash made by <a href="http://venturebeat.com/2011/01/29/yuri-milner-and-ron-conway-aim-to-disrupt-angel-investing-with-latest-proposal/">Yuri and Ron Conway</a>, it should be obvious that 2011 is the year for developers and designers. Incubators and accelerators are popping up around the country, while the big boys like Google and Facebook are making <a href="http://www.businessinsider.com/google-engineer-gets-6-million-for-not-going-to-facebook-2010-11">multi-million dollar offers</a> to retain top talent.</p>
<p>It's easy to understand the motivation to get better, but where do these hackers and designers go to do just that? <a href="http://www.stackoverflow.com">StackOverflow</a> and <a href="http://www.quora.com/">Quora</a> are great for single questions but you are also going to have to wade through all of the questions from people struggling to complete an online tutorial or their cs problem set.</p>
<p><a href="http://www.Forrst.com">Forrst</a> is a private, invite only community for professional level developers and designers. It's designed to let people share what they are working on, struggling with, or launching. Members are then encouraged to provide feedback, likes, or other comments through a reputation system that awards points for these activities. Having access to high quality people in this community is unlike any social site out there. It's comforting to find a community where people are able to seek and gain helpful feedback instead of the elitists, trolls, or spam that swarms postings at other sites. People are genuinely interested in sharing what they are working on, without any NDA nonsense because the feedback is so valuable that they can iterate or pivot faster than they would be able to working independently. I would encourage any independent or startup developers and designers to head to the <a href="http://www.forrst.com">Forrst</a>.</p>
<p>Also <a href="http://forrst.me/adam0101">follow me</a> on Forrst to see some of the things I'm working on.</p>]]></content></entry><entry><title>App Marketing</title><category term="marketing"/><id>http://remarkablepixels.com/blog/2011/1/27/app-marketing.html</id><link rel="alternate" type="text/html" href="http://remarkablepixels.com/blog/2011/1/27/app-marketing.html"/><author><name>Adam</name></author><published>2011-01-27T15:43:48Z</published><updated>2011-01-27T15:43:48Z</updated><content type="html" xml:lang="en-US"><![CDATA[<p>Great article from the folks over at Tapity on how to do app marketing, inspired by two of my favorite brands Starbucks and Apple.</p>
<p><a href="http://tapity.com/iphone-app-marketing/marketing-lessons-from-starbucks/">Part I</a></p>
<p><a href="http://tapity.com/iphone-app-design/the-power-of-cool/">Part II</a></p>]]></content></entry><entry><title>Dismiss iPhone keyboard</title><id>http://remarkablepixels.com/blog/2011/1/23/dismiss-iphone-keyboard.html</id><link rel="alternate" type="text/html" href="http://remarkablepixels.com/blog/2011/1/23/dismiss-iphone-keyboard.html"/><author><name>Adam</name></author><published>2011-01-24T03:40:15Z</published><updated>2011-01-24T03:40:15Z</updated><content type="html" xml:lang="en-US"><![CDATA[<p>&nbsp;</p>
<p>Quick tip on how to dismiss the keyboard in iOS when a user touches anywhere on the screen outside of the UITextField or keyboard.  Considering how much real estate the iOS keyboard can take up, it makes sense to have an easy and intuitive way for your users to dismiss the keyboard.  Add the following code below to your .m file for your view controller.<script src="https://gist.github.com/792797.js?file=DismissMe.m"></script></p>]]></content></entry></feed>