<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>goto 0</title>
	<atom:link href="http://goto0.cubelogic.org/feed" rel="self" type="application/rss+xml" />
	<link>http://goto0.cubelogic.org</link>
	<description>thoughts about programming</description>
	<lastBuildDate>Thu, 23 Feb 2012 06:01:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to view XML source in Mobile Safari</title>
		<link>http://goto0.cubelogic.org/a/254</link>
		<comments>http://goto0.cubelogic.org/a/254#comments</comments>
		<pubDate>Thu, 23 Feb 2012 05:45:21 +0000</pubDate>
		<dc:creator>ettore</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[Mobile Safari]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://goto0.cubelogic.org/?p=254</guid>
		<description><![CDATA[I see a lot of XML code at Goodreads while working on their iOS app, but some time ago I realized I didn&#8217;t have an easy way to see the XML source of a given API response on the iPad. Incidentally, when I realized that I was in bed, and the iPad was the only [...]]]></description>
			<content:encoded><![CDATA[<p>I see a lot of XML code at <a href="http://www.goodreads.com/about/jobs">Goodreads</a> while working on their <a href="http://www.goodreads.com/blog/show/270-groups-support-in-the-iphone-app">iOS app</a>, but some time ago I realized I didn&#8217;t have an easy way to see the XML source of a <a href="http://goodreads.com/api">given API response</a> on the iPad. Incidentally, when I realized that I was in bed, and the iPad was the only device within my reach.</p>
<p>So I found <a href="http://www.ravelrumba.com/wp/wp-content/code/view-source.txt">this script</a> on ravelrumba.com which worked fine for HTML pages, but not so much with pure XML content. </p>
<p>Being not a JavaScript expert, it took me a while to make the script work on Mobile Safari, but the following fix seems to do its job. The trick was to replace the usage of <code>document.documentElement.innerHTML</code> with <code>XMLSerializer:: serializeToString()</code>, which serializes a XML tree to a string. </p>
<p>Here&#8217;s the whole thing. Just add it as a bookmarklet on your Mobile Safari bookmarks bar:</p>
<pre>
javascript:(function(){var a=window.open('about:blank').document;a.write('< !DOCTYPE html><html>
<head><meta name="viewport" content="width=device-width" /></head><body></body></html>');a.close();var b=a.body.appendChild(a.createElement('pre'));b.style.overflow='auto';b.style.whiteSpace='pre-wrap';b.appendChild(a.createTextNode((new XMLSerializer()).serializeToString(document.documentElement)))})();
</pre>
]]></content:encoded>
			<wfw:commentRss>http://goto0.cubelogic.org/a/254/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Steve Jobs</title>
		<link>http://goto0.cubelogic.org/a/235</link>
		<comments>http://goto0.cubelogic.org/a/235#comments</comments>
		<pubDate>Thu, 06 Oct 2011 07:36:00 +0000</pubDate>
		<dc:creator>ettore</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[idealism]]></category>
		<category><![CDATA[insanely great]]></category>
		<category><![CDATA[minimal design]]></category>
		<category><![CDATA[steve jobs]]></category>

		<guid isPermaLink="false">http://goto0.cubelogic.org/?p=235</guid>
		<description><![CDATA[It&#8217;s weird. I&#8217;ve never had the privilege to work for Steve Jobs, let alone meet him or know him, yet it feels like someone close died. Earlier today, I was reflecting on the fact that he is one of my childhood heroes. Since when I was a teenager I was dreaming about owning a Macintosh [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_248" class="wp-caption aligncenter" style="width: 310px"><a href="http://goto0.cubelogic.org/wp-content/uploads/2011/10/apple.com-2011-10-05-at-10.43.35-PM1.png"><img src="http://goto0.cubelogic.org/wp-content/uploads/2011/10/apple.com-2011-10-05-at-10.43.35-PM1-300x252.png" alt="apple.com 2011-10-05 at 10.43.35 PM" title="apple.com 2011-10-05 at 10.43.35 PM" width="300" height="252" class="size-medium wp-image-248" /></a><p class="wp-caption-text">apple.com 2011-10-05 at 10.43.35 PM</p></div>
<p>It&#8217;s weird. I&#8217;ve never had the privilege to work for Steve Jobs, let alone meet him or know him, yet it feels like someone close died.</p>
<p>Earlier today, I was reflecting on the fact that he is one of my childhood heroes. Since when I was a teenager I was dreaming about owning a Macintosh and play games on it. (I imagined, it must be a <i>totally</i> different experience.) Or make music with it. Or whatever. Or having a <a href="http://en.wikipedia.org/wiki/Next_cube">NeXT cube</a>, with its absurd magnesium body. I love(d) that thing. Its beautifully architected OS. And this obscure language no-one else was using, Objective-C. It&#8217;s so weird to see people wanting to learn it today. Ten years ago nobody knew what I was talking about. &#8220;Objective-what?&#8221;</p>
<p>The world lost a complex visionary. The asshole who declared floppy disks obsolete in circa 1989. The man who gave a name to those weird devices called &#8220;MP3 players&#8221; that nobody was using before the iPod. The guy who insisted on the simplicity of single-button mice. Not forgetting the businessman unafraid to admit his LSD experiences. You don&#8217;t see too many people like that.</p>
<p>Most importantly, he made me understand that engineering can meet with art and idealism. </p>
<p>So, thank you <a href="http://apple.com/stevejobs">Steve Jobs</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://goto0.cubelogic.org/a/235/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iOS 4.2 update and the Base SDK Missing error</title>
		<link>http://goto0.cubelogic.org/a/231</link>
		<comments>http://goto0.cubelogic.org/a/231#comments</comments>
		<pubDate>Mon, 06 Dec 2010 06:49:20 +0000</pubDate>
		<dc:creator>ettore</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[iOS SDK]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://goto0.cubelogic.org/?p=231</guid>
		<description><![CDATA[If after updating to iOS 4.2 SDK you get a &#8220;Base SDK Missing&#8221; error: open Project settings and choose &#8220;Latest iOS&#8221; under Base SDK for All Configurations open your target and make sure the settings applies to it (in case you overrode it) (yes, somehow the &#8220;Base SDK Missing&#8221; error seems to stick) shutdown Xcode [...]]]></description>
			<content:encoded><![CDATA[<p>If after updating to iOS 4.2 SDK you get a &#8220;Base SDK Missing&#8221; error:</p>
<ol>
<li>open Project settings and choose &#8220;Latest iOS&#8221; under Base SDK for All Configurations</li>
<li>open your target and make sure the settings applies to it (in case you overrode it)</li>
<li>(yes, somehow the &#8220;Base SDK Missing&#8221; error seems to stick)</li>
<li>shutdown Xcode and reopen.</li>
</ol>
<p>The SDK now is set.</p>
]]></content:encoded>
			<wfw:commentRss>http://goto0.cubelogic.org/a/231/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building Erlang OTP R14B on OpenBSD 4.7</title>
		<link>http://goto0.cubelogic.org/a/215</link>
		<comments>http://goto0.cubelogic.org/a/215#comments</comments>
		<pubDate>Mon, 27 Sep 2010 23:30:10 +0000</pubDate>
		<dc:creator>ettore</dc:creator>
				<category><![CDATA[Erlang]]></category>
		<category><![CDATA[OpenBSD]]></category>

		<guid isPermaLink="false">http://goto0.cubelogic.org/?p=215</guid>
		<description><![CDATA[Summary: OpenBSD is not GNU/Linux! I just spent the last 20 minutes baffled by some weird errors as I was building Erlang on an OpenBSD box I am setting up. $ make make: "/home/acces/otp_src_R13B04/Makefile" line 88: Missing dependency operator make: "/home/acces/otp_src_R13B04/Makefile" line 89: Missing dependency operator ... 100 similar lines follow ... The problem is&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>Summary: OpenBSD is not GNU/Linux!</p>
<p>I just spent the last 20 minutes baffled by some weird errors as I was building Erlang on an OpenBSD box I am setting up. </p>
<pre>$ make
make: "/home/acces/otp_src_R13B04/Makefile" line 88: Missing dependency operator
make: "/home/acces/otp_src_R13B04/Makefile" line 89: Missing dependency operator
...
100 similar lines follow
...
</pre>
<p>The problem is&#8230; that when you type <code>make</code>, OpenBSD &#8212; and probably NetBSD and FreeBSD &#8212; all use <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=make&#038;sektion=1">BSD make</a> by default, NOT <code>GNU make</code>! Silly me. I even had just installed <code>GNU make</code> a couple hours earlier!</p>
<p>So anyway:</p>
<pre>
$ pkg_add -i -v gmake
...
[download, unzip, configure Erlang OTP]
...
<del>$ make</del> # WILL FAIL!
$ gmake
</pre>
]]></content:encoded>
			<wfw:commentRss>http://goto0.cubelogic.org/a/215/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>GitHub love</title>
		<link>http://goto0.cubelogic.org/a/209</link>
		<comments>http://goto0.cubelogic.org/a/209#comments</comments>
		<pubDate>Mon, 13 Sep 2010 07:30:04 +0000</pubDate>
		<dc:creator>ettore</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://goto0.cubelogic.org/?p=209</guid>
		<description><![CDATA[I imported some of my open source code over to GitHub. I have to say I was surprised how easy and smooth the import went from my old svn repository. The whole history seems to have been imported nicely. Beside importing SimpleTimer (my first Cocoa app: beware, its code might not be the prettiest!), this [...]]]></description>
			<content:encoded><![CDATA[<p>I imported some of <a href="http://github.com/ettore">my open source code</a> over to GitHub. I have to say I was surprised how easy and smooth the import went from my old svn repository. The whole history seems to have been imported nicely. </p>
<p>Beside importing <a href="http://cubelogic.org/simpletimer">SimpleTimer</a> (my first Cocoa app: beware, its code might not be the prettiest!), this is the first release of <a href="http://cubelogic.org/clutils">CLutils</a>, my collection of C/C++/Objective-C functions built over the years. There&#8217;s not much structure in it, beside subdividing it by deployment platforms (Mac OS X, iOS and cross-platform code) and OS X APIs (Carbon, Cocoa).</p>
<p><a href="http://github.com/ettore/SimpleTimer/">http://github.com/ettore/SimpleTimer/</a><br />
<a href="http://github.com/ettore/CLutils/">http://github.com/ettore/CLutils/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://goto0.cubelogic.org/a/209/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FlashBuilder quirks</title>
		<link>http://goto0.cubelogic.org/a/205</link>
		<comments>http://goto0.cubelogic.org/a/205#comments</comments>
		<pubDate>Thu, 02 Sep 2010 06:12:49 +0000</pubDate>
		<dc:creator>ettore</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[FlashBuilder]]></category>
		<category><![CDATA[FlexBuilder]]></category>

		<guid isPermaLink="false">http://goto0.cubelogic.org/?p=205</guid>
		<description><![CDATA[I ran into the following weird compile error recently: compile error: 1071: Syntax error: expected a definition keyword (such as function) after attribute override, not protected. in relation to the following code: override protected function createChildren():void {} The solution? override protected function createChildren():void {} Don&#8217;t even get me started.]]></description>
			<content:encoded><![CDATA[<p>I ran into the following weird compile error recently:</p>
<pre>
<code>compile error:
1071: Syntax error: expected a definition keyword (such as function) after attribute override, not protected.
</code>
</pre>
<p>in relation to the following code:</p>
<pre>
<code>
override
protected function createChildren():void {}
</code>
</pre>
<p>The solution? </p>
<pre>
<code>
override protected function createChildren():void {}
</code>
</pre>
<p>Don&#8217;t even get me started.</p>
]]></content:encoded>
			<wfw:commentRss>http://goto0.cubelogic.org/a/205/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating your Apple Push Notification Service certificates</title>
		<link>http://goto0.cubelogic.org/a/186</link>
		<comments>http://goto0.cubelogic.org/a/186#comments</comments>
		<pubDate>Tue, 31 Aug 2010 06:13:22 +0000</pubDate>
		<dc:creator>ettore</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[iOS SDK]]></category>
		<category><![CDATA[push notifications]]></category>

		<guid isPermaLink="false">http://goto0.cubelogic.org/?p=186</guid>
		<description><![CDATA[Just a quick checklist to get up to speed when your APN certificates expire. Login into the Provisioning Portal, click &#8220;App IDs&#8221; on the left side column Click &#8220;Configure&#8221; on the App ID of your app Click Revoke for the expired Push SSL certificate Open Keychain Access on your Mac. Click the &#8220;Certificates&#8221; category, find [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick checklist to get up to speed when your APN certificates expire.</p>
<ol>
<li>Login into the <a href="https://developer.apple.com/iphone/manage/bundles/index.action">Provisioning Portal</a>, click &#8220;App IDs&#8221; on the left side column</li>
<li>Click &#8220;Configure&#8221; on the App ID of your app</li>
<li>Click Revoke for the expired Push SSL certificate</li>
<li>Open Keychain Access on your Mac. Click the &#8220;Certificates&#8221; category, find the expired cert and just delete it.</li>
<li>From the Provisioning Portal website, start creating a brand new Push SSL certificate. Just follow the instructions. </li>
<li>Don&#8217;t forget to download the signed cert and double-click it to install it (<code>aps_developer_identity.cer</code>) in your default keychain.</li>
<li>Find the newly created cert in Keychain Access and click the disclose triangle. Then:
<ul>
<li>- Right-click on the private key entry without selecting the parent, and select Export. A <code>.p12</code> file will be saved </li>
<li>- Right-click on the actual certificate <em>without</em> selecting the child key, and select Export. Another <code>.p12</code> file will be saved </li>
</ul>
</li>
<li>If your server requires <code>.pem</code> style certificates, run this:
<pre>
$ openssl pkcs12 -in apn_cert.p12 -out apn_cert.pem -nodes
$ openssl pkcs12 -in apn_key.p12 -out apn_key.pem -nodes
</pre>
</li>
<li>Deploy the <code>.pem</code> files in the right location accessible by your application server that will be sending the Push notifications.</li>
</ol>
<p>Now push notifications should be up and running once again.</p>
]]></content:encoded>
			<wfw:commentRss>http://goto0.cubelogic.org/a/186/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quickly rebuild your iOS app when Provisioning Profile expires</title>
		<link>http://goto0.cubelogic.org/a/172</link>
		<comments>http://goto0.cubelogic.org/a/172#comments</comments>
		<pubDate>Sun, 29 Aug 2010 05:52:07 +0000</pubDate>
		<dc:creator>ettore</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[provisioning profiles]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://goto0.cubelogic.org/?p=172</guid>
		<description><![CDATA[Login into the Provisioning Portal, click &#8220;Provisioning&#8221; on the left side column Renew your expired profile (or create new one) and download it Drag it over the Xcode dock icon (or add it into the Organizer) Remove old profiles from Xcode Organizer Open your Device target. Select the Build tab -> Code Signing Identity, and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://goto0.cubelogic.org/wp-content/uploads/2010/08/prov-proft.png"><img src="http://goto0.cubelogic.org/wp-content/uploads/2010/08/prov-proft.png" alt="" title="prov-proft" width="325" height="129" class="alignleft size-full wp-image-176" /></a></p>
<ol>
<li>Login into the <a href="https://developer.apple.com/iphone/manage/provisioningprofiles/index.action">Provisioning Portal</a>, click &#8220;Provisioning&#8221; on the left side column</li>
<li>Renew your expired profile (or create new one) and download it</li>
<li>Drag it over the Xcode dock icon (or add it into the Organizer)</li>
<li>Remove old profiles from Xcode Organizer</li>
<li>Open your Device target. Select the <em>Build</em> tab -> <em>Code Signing Identity</em>, and <strong>make sure the new profile is the one in use</strong>.<br />
Xcode has the habit of not automatically updating its targets to use the newly installed provisioning profile. (Even if you physically removed the old one.) </li>
</ol>
<p>At this point you should be able to rebuild the app.</p>
]]></content:encoded>
			<wfw:commentRss>http://goto0.cubelogic.org/a/172/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bitstrings and Binaries (Erlang bit syntax minihowto part 2)</title>
		<link>http://goto0.cubelogic.org/a/142</link>
		<comments>http://goto0.cubelogic.org/a/142#comments</comments>
		<pubDate>Mon, 26 Jul 2010 04:24:57 +0000</pubDate>
		<dc:creator>ettore</dc:creator>
				<category><![CDATA[Erlang]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[bitstrings]]></category>

		<guid isPermaLink="false">http://goto0.cubelogic.org/?p=142</guid>
		<description><![CDATA[What&#8217;s the difference between the Binary and Bitstring types in Erlang? Well, a bitstring is a sequence of bits of any length; a binary is a sequence of bits where the number of bits is evenly divisible by 8. (So any binary is also a bitstring.) Some examples: 1> &#60;&#60;2#11110000:5>>. < &#60;16:6>> 2> &#60;&#60;2#11110000:6>>. < [...]]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s the difference between the Binary and Bitstring types in Erlang?  Well, a <strong>bitstring</strong> is a sequence of bits of any length; a <strong>binary</strong> is a sequence of bits where the number of bits is evenly divisible by 8. (So any binary is also a bitstring.)</p>
<p>Some examples:</p>
<pre>
<code>1> &lt;&lt;2#111<strong>10000</strong>:5>>.
< &lt;16:6>>
2> &lt;&lt;2#11<strong>110000</strong>:6>>.
< &lt;48:6>>
3> erlang:is_bitstring(&lt;&lt;2#11110000:6>>).
true
4> erlang:is_binary(&lt;&lt;2#11110000:6>>).
<strong>false</strong>
5> erlang:is_bitstring(&lt;&lt;2#11110000:8>>).
true
6> erlang:is_binary(&lt;&lt;2#11110000:8>>).
true
</code></pre>
<p>In the <a href="http://goto0.cubelogic.org/a/90">Erlang bit syntax</a> there are 2 clarifying (?) type synonyms: </p>
<pre>
<code>bytes == binary
bits  == bitstring</code>
</pre>
<p>which are basically telling you to think of binaries as sequence of bytes, and bitstrings as sequence of bits. Quite obvious right? Well, it wasn&#8217;t for me at first.</p>
<p>It&#8217;s also worth noting how binaries and bitstrings are converted into text strings. Given the binary <code>&lt;&lt;16#50>></code> storing the letter &#8216;P&#8217;, </p>
<pre>
<code>7> &lt;&lt;16#50>>
<strong>&lt;&lt;"P">></strong>
8>erlang:bitstring_to_list(&lt;&lt;16#50>>). #I could've used binary_to_list()
<strong>"P"</strong>          <em>%great!</em>
9>erlang:bitstring_to_list(&lt;&lt;16#50:5>>).
<strong>[&lt;&lt;16:5>>]</strong>  <em>%mmh...</em>
</code></pre>
<p>The result of command #9 is not exactly what I had imagined. Yes, it&#8217;s a list, but it&#8217;s certainly not a text string, and I was expecting a text string.  Why was I expecting a text string if the API is named <code>bitstring_to_list()</code> ? Because if I was in the middle of coding a text manipulation algorithm and called <code>bitstring_to_list()</code>, I would probably (wrongly) assume that it would do some magic and transform <em>any</em> bitstring in a usable <em>text string</em>. Why? Because we are used to treat text strings as lists.  Why? Because we don&#8217;t have APIs that mention &#8220;strings&#8221;: all the builtin APIs only mention lists. That&#8217;s the problem. We are using a list API as if it was a string API, when a generic list is not necessarily a string.</p>
]]></content:encoded>
			<wfw:commentRss>http://goto0.cubelogic.org/a/142/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing a UIButton title and dealing with button States</title>
		<link>http://goto0.cubelogic.org/a/116</link>
		<comments>http://goto0.cubelogic.org/a/116#comments</comments>
		<pubDate>Thu, 22 Jul 2010 05:10:14 +0000</pubDate>
		<dc:creator>ettore</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Cocoa Touch]]></category>
		<category><![CDATA[iOS SDK]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[UIButton]]></category>
		<category><![CDATA[UIKit]]></category>

		<guid isPermaLink="false">http://goto0.cubelogic.org/?p=116</guid>
		<description><![CDATA[If you are changing the title of a UIButton programmatically, you will naturally use the method setTitle:forState:. Easy enough&#8230; well, sort of. What do you put in the state parameter? My first reaction was &#8220;I&#8217;m going to put all possible states since I just want the button title to change no matter what.&#8221; So I [...]]]></description>
			<content:encoded><![CDATA[<p>If you are changing the title of a UIButton programmatically, you will naturally use the method <strong><code>setTitle:forState:</code></strong>. Easy enough&#8230; well, sort of. What do you put in the state parameter?</p>
<p>My first reaction was &#8220;I&#8217;m going to put all possible states since I just want the button title to change no matter what.&#8221; So I blindly <em>bit-OR</em>&#8216;ed all the possible values defined in the docs. </p>
<pre><code>
[myButton setTitle:@"New Title"
          forState:UIControlStateNormal | UIControlStateHighlighted | UIControlStateDisabled | UIControlStateSelected];</code></pre>
<p>Sound reasonable right? Wrong. If you do that here, your button title is probably not going to change at all. The problem is that the &#8220;normal&#8221; state (per Apple docs that&#8217;s &#8220;enabled, not selected, not highlighted&#8221;) is defined as such:</p>
<pre>
<code>enum {
    <strong>UIControlStateNormal   = 0,</strong>
    UIControlStateHighlighted  = 1 &lt;&lt; 0,
    UIControlStateDisabled     = 1 &lt;&lt; 1,
    UIControlStateSelected     = 1 &lt;&lt; 2,
    ...
}
</code>
</pre>
<p>so if you bit-OR all of them you are actually going to set the title for ALL states EXCEPT the &#8220;normal&#8221; (most common) state!</p>
<p>Sigh&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://goto0.cubelogic.org/a/116/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

