<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  
  <title>Steamshift Blog</title>
  <meta name="author" content="Brothers Bennett">
  
  
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

  
  <meta property="og:site_name" content="Steamshift Blog"/>

  
    <meta property="og:image" content="undefined"/>
  

  <link href="/favicon.png" rel="icon">

  <link rel="alternate" href="http://feeds.feedburner.com/SteamshiftBlog" title="Steamshift Blog" type="application/atom+xml">

  <link rel="stylesheet" href="/css/style.css" media="screen" type="text/css">

  <script src='/js/modernizr.custom.37763.js'></script>
  <!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
  
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27404345-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>

  
  
  <link href='http://fonts.googleapis.com/css?family=Rokkitt:700|Questrial' rel='stylesheet' type='text/css'>
</head>


<body>
    <div class="container">
      <div class="left-col">
        <div class="intrude-less">
          <header id="header" class="inner">
            <div class="profilepic">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 width="160px" height="70px" viewBox="61.541 44.848 186.87 81.427" xml:space="preserve">
<path fill="#FFFFFF" d="M225.294,121.829l18.889-18.896c5.638-5.63,5.638-14.801,0.002-20.436l-13.159-13.163l-5.729-5.727
	l-5.576-5.574l-4.645-4.646l-4.646,4.646l-5.571,5.574l-12.232,12.229l-6.657,6.66c-5.633,5.631-5.633,14.802,0.001,20.436
	l18.893,18.892C210.492,127.46,219.661,127.46,225.294,121.829z M190.259,95.315c-3.077-3.078-3.076-8.064,0.004-11.146l6.658-6.657
	L209.15,65.28l5.575-5.574l5.57,5.572l5.731,5.729l13.16,13.162c3.078,3.077,3.078,8.068-0.001,11.146l-18.892,18.889
	c-3.077,3.079-8.066,3.079-11.146,0L190.259,95.315z"/>
<polygon fill="#47C1C3" points="226.408,103.287 226.408,78.057 201.175,78.057 207.108,83.99 196.357,94.741 209.724,108.109 
	220.476,97.354 "/>
<g>
	<path fill="#FFFFFF" d="M74.661,64.069v8.343c0,7.25-4.881,11.048-13.12,10.473v-6.792c3.111,0.231,5.125-1.091,5.125-4.027v-8.343
		c0-7.25,4.883-11.048,13.12-10.47v6.789C76.674,59.811,74.661,61.133,74.661,64.069z"/>
	<path fill="#FFFFFF" d="M90.155,60.096v12.892c0,2.473,1.283,3.162,3.786,3.162v6.792h-0.55c-7.323,0-11.229-2.247-11.229-9.496
		V46.233h7.994v7.075h4.333v6.788H90.155L90.155,60.096z"/>
	<path fill="#FFFFFF" d="M106.259,82.941c-5.978,0-9.641-3.223-9.641-8.632V61.017c0-5.409,3.663-8.629,9.641-8.629
		c5.983,0,9.644,3.22,9.644,8.629v6.445l-11.291,3.913v2.704c0,1.322,0.672,2.069,1.646,2.069c0.979,0,1.65-0.747,1.65-2.069v-1.782
		h7.993v2.012C115.902,79.719,112.243,82.941,106.259,82.941z M107.909,61.25c0-1.325-0.672-2.072-1.65-2.072
		c-0.976,0-1.646,0.747-1.646,2.072v4.373l3.297-1.268V61.25z"/>
	<path fill="#FFFFFF" d="M130.608,82.48v-2.244c-0.731,1.612-2.379,2.705-4.516,2.705c-4.699,0-7.322-2.762-7.322-8.285V61.017
		c0-5.409,3.845-8.629,9.824-8.629c5.981,0,9.825,3.22,9.825,8.629V82.48H130.608z M130.427,61.25c0-1.325-0.854-2.072-1.832-2.072
		s-1.829,0.747-1.829,2.072v12.83c0,1.322,0.853,2.069,1.829,2.069c0.978,0,1.832-0.747,1.832-2.069V61.25z"/>
	<path fill="#FFFFFF" d="M164.415,82.941V61.707c0-1.321-0.73-2.068-1.707-2.068c-0.979,0-1.709,0.747-1.709,2.068v21.234h-7.995
		V61.707c0-1.321-0.73-2.068-1.708-2.068c-0.976,0-1.708,0.747-1.708,2.068v21.234h-7.992V61.478c0-5.409,3.722-8.629,9.7-8.629
		c2.258,0,4.577,0.861,5.737,2.187c1.221-1.325,3.416-2.187,5.676-2.187c5.979,0,9.703,3.22,9.703,8.629v21.463H164.415z"/>
</g>
<g>
	<path fill="#47C1C3" d="M103.092,107.402v8.343c0,7.25-4.882,11.048-13.12,10.473v-6.792c3.113,0.231,5.126-1.091,5.126-4.026
		v-8.344c0-7.25,4.882-11.048,13.12-10.47v6.789C105.108,103.144,103.092,104.466,103.092,107.402z"/>
	<path fill="#47C1C3" d="M121.884,126.274V105.04c0-1.321-0.732-2.068-1.71-2.068c-0.976,0-1.705,0.747-1.705,2.068v21.234h-7.997
		V86.457h7.997v11.795c0.791-1.149,2.377-2.069,4.146-2.069c4.639,0,7.263,2.76,7.263,8.283v21.81L121.884,126.274L121.884,126.274z
		"/>
	<path fill="#47C1C3" d="M133.173,94.282v-3.738c0-1.957,1.894-3.396,3.965-3.396c2.139,0,4.028,1.439,4.028,3.396v3.738H133.173z
		 M133.173,126.274V96.64h7.993v29.635H133.173z"/>
	<path fill="#47C1C3" d="M152.58,96.411v0.229h4.029v6.788h-4.029v22.847h-7.993V96.065c0-6.676,3.844-10.185,12.143-9.608v6.789
		C153.922,93.074,152.58,93.821,152.58,96.411z"/>
	<path fill="#47C1C3" d="M168.08,103.429v12.893c0,2.473,1.28,3.162,3.782,3.162v6.792h-0.551c-7.32,0-11.228-2.247-11.228-9.496
		V89.565h7.995v7.076h4.331v6.787H168.08L168.08,103.429z"/>
</g>
</svg>
<img src="/images/logo.png" alt="Steamshift logo">
</div><!-- profilepic -->
<h1><a href="/">BLOG</a></h2>
<p>Stuff we're doing, stuff we've seen, stuff we like.</p>
<nav id="main-nav">
    <ul class="main">
	<li><a href="/">Recent items</a></li>
	<li><a href="/archives">Archives</a></li>
</ul>

<ul class="othersites">
	<li><a href="http://steamshift.com">Steamshift</a></li>
	<li><a href="http://labs.steamshift.com">Labs</a></li>
</ul>
</nav>
<nav id="sub-nav">
  <div class="social">
    
      <a class="twitter" href="http://twitter.com/steamshift"
         title="Twitter">Twitter</a>
    
    
    
        <a class="rss" href="/atom.xml" title="RSS">RSS</a>
    
  </div>
</nav><!-- sub-nav -->


          <header>
        </div><!-- intrude-less -->
      </div><!-- left-col -->
      <div class="mid-col">
        <div class="mid-col-container">
	    <div id="content" class="inner"><div itemscope itemtype="http://schema.org/Blog">

  <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  
	<div class="meta">
          
<div class="date">

<time datetime="2013-10-28T00:22:59.000Z"
      
      data-updated="true"
       itemprop="datePublished">
  Oct 28 2013
</time>





</div>

          


          
	</div>
        <h1 class="title" itemprop="name">
          <a href="/blog/2013/10/28/string-structs/" itemprop="url">
            String Structs</a>
        </h1>
        <div class="entry-content" itemprop="articleBody">
          
            <p>Looking through a file from the Facebook iOS SDK, I came across a reference to this:-</p>
<figure class="highlight lang-objc"><table><tr><td class="gutter"><pre>1
</pre></td><td class="code"><pre><span class="function"><span class="title">if</span> <span class="params">(app<span class="variable">BridgeType</span> &amp;&amp; [dictionary[<span class="variable">FBAppBridgeTypesMetadata</span>.tag] is<span class="variable">EqualToString</span>:<span class="variable">FBAppBridgeTypesTags</span>.png])</span>
</pre></td></tr></table></figure>


<p>The bit that interested me in particular was the use of <code>FBAppBridgeTypesMetadata.tag</code> and <code>FBAppBridgeTypesTags.png</code> which seemed to be strings and constants. I&#39;ve used string constants before, but have never seen this .xyz construction.</p>
<p>It turns out its a simple struct:-</p>
<figure class="highlight lang-objc"><table><tr><td class="gutter"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">struct</span> {
    <span class="built_in">NSString</span> *data;
    <span class="built_in">NSString</span> *png;
} FBAppBridgeTypesTags = {
    <span class="variable">.data</span> = @<span class="string">"data"</span>,
    <span class="variable">.png</span> = @<span class="string">"png"</span>,
};
</pre></td></tr></table></figure>


<p>I do rather like the way this is so self-contained. Must endeavour to learn a bit more C!!</p>

          
        </div>


</article>




  <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  
	<div class="meta">
          
<div class="date">

<time datetime="2013-10-09T15:07:00.000Z"
      
      data-updated="true"
       itemprop="datePublished">
  Oct 9 2013
</time>





</div>

          


          
	</div>
        <h1 class="title" itemprop="name">
          <a href="/blog/2013/10/09/the-node-revolution/" itemprop="url">
            The Node Revolution</a>
        </h1>
        <div class="entry-content" itemprop="articleBody">
          
            <p>Having moved last year to Octopress to generate of static websites (such as this one), a major advantage presents itself; as the sites are now platform independent, the generator code can be swapped out with ease.</p>
<p>In line with my focus on Objective-C for native iOS development and Node.js for everything else, I thought it&#39;d be a good idea to see how easy it would be to use node to generate the labs and blog sites…</p>

            <a href="/blog/2013/10/09/the-node-revolution/" class="more-link">
              Continue →
            </2a>
          
        </div>


</article>




  <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  
	<div class="meta">
          
<div class="date">

<time datetime="2013-03-18T16:07:00.000Z"
      
      data-updated="true"
       itemprop="datePublished">
  Mar 18 2013
</time>





</div>

          


          
	</div>
        <h1 class="title" itemprop="name">
          <a href="/blog/2013/03/18/working-with-parse-dot-com/" itemprop="url">
            Working with Parse.com</a>
        </h1>
        <div class="entry-content" itemprop="articleBody">
          
            <p>For the last few apps I‘ve been working on, I’ve used Parse.com as a backend, allowing for syncing data between app and website/cms.</p>
<p>For the most part, it has been an excellent experience, and I&#39;d recommend it to anyone needing a hosted backend solution for a web, desktop or mobile application. There are however some gotchas which you may need to be aware of …</p>

            <a href="/blog/2013/03/18/working-with-parse-dot-com/" class="more-link">
              Continue →
            </2a>
          
        </div>


</article>




  <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  
	<div class="meta">
          
<div class="date">

<time datetime="2013-03-10T13:13:00.000Z"
      
      data-updated="true"
       itemprop="datePublished">
  Mar 10 2013
</time>





</div>

          


          
	</div>
        <h1 class="title" itemprop="name">
          <a href="/blog/2013/03/10/stencyling/" itemprop="url">
            Stencyling</a>
        </h1>
        <div class="entry-content" itemprop="articleBody">
          
            <p>Recently I’ve been trying out <a href="http://stencyl.com" target="_blank">Stencyl</a>, which is a game making framework, based on MIT’s <a href="http://scratch.mit.edu/" target="_blank">Scratch</a>, which publishes to Flash and iOS. Version 2 uses Actionscript, but the new version currently in beta uses <a href="http://www.nme.io/" target="_blank">Haxe NME</a>  for more speed and ease of publishing to more platforms, including Android.</p>

            <a href="/blog/2013/03/10/stencyling/" class="more-link">
              Continue →
            </2a>
          
        </div>


</article>




  <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  
	<div class="meta">
          
<div class="date">

<time datetime="2013-02-26T11:00:00.000Z"
      
      data-updated="true"
       itemprop="datePublished">
  Feb 26 2013
</time>





</div>

          


          
	</div>
        <h1 class="title" itemprop="name">
          <a href="/blog/2013/02/26/n-things-i-want-to-see-in-ios-7-number-2/" itemprop="url">
            n Things I want to see in iOS 7 - #2</a>
        </h1>
        <div class="entry-content" itemprop="articleBody">
          
            <p>These next two are features I&#39;d like to see implemented in iOS 7, both of which I think could be very big news for developers initially, and the platform as a whole once developers get to grips with them.</p>
<ul>
<li>XPC / Promises / Intents - one area that Android is definitely ahead of iOS is in the ability of various apps to interact with each other. Ole Bergman has an <a href="http://oleb.net/blog/2012/02/what-ios-should-learn-from-android-and-windows-8/" target="_blank">excellent introduction</a> to Android‘s intents and promises (and in the same vein “charms” in Windows 8) and how these might be implemented in iOS. Its quite an old article now (a year old at time of writing); since that time Apple have released iOS6 which has some movement in that direction; again Ole has written about Apple’s <a href="http://oleb.net/blog/2012/10/remote-view-controllers-in-ios-6/" target="_blank">remote view controllers</a>. I&#39;d love to see this sort of thing pushed much further and, perhaps related, giving users the ability to set the default app to handle e.g.: email.</li>
</ul>
<p>Personally, I think that if implemented well and extensively, this could be huge for iOS development and the utility of iOS as a whole.</p>
<ul>
<li>SceneKit - introduced in Mac OS X 10.8, scene kit provides scene graph management for Open GL. Although there are some good libraries in this vein for iOS, it would make a huge amount of sense to have scene kit in iOS providing a similar environment for working with Open GL as in Mac OS X.</li>
</ul>
<p>From experience working with one of the open-source scene graph libraries out there, this is definitely an area where a well implemented library from Apple could have a huge impact on the development of 3d in games and interfaces on iOS.</p>
<p>Fingers crossed on seeing either or both of these in iOS 7!</p>

          
        </div>


</article>




  <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  
	<div class="meta">
          
<div class="date">

<time datetime="2013-02-25T12:30:00.000Z"
      
      data-updated="true"
       itemprop="datePublished">
  Feb 25 2013
</time>





</div>

          


          
	</div>
        <h1 class="title" itemprop="name">
          <a href="/blog/2013/02/25/parse-plus-sendgrid-equals-equals-contact-forms-for-static-sites/" itemprop="url">
            Parse + Sendgrid == Contact forms for static sites</a>
        </h1>
        <div class="entry-content" itemprop="articleBody">
          
            <p>Having started the process of migrating to predominantly static websites, the one very obvious issue is that there&#39;s no easy way of adding a contact form…</p>
<p>I&#39;ve been using <a href="http://parse.com" target="_blank">Parse.com</a> a fair bit recently for iOS work, and recently for an iOS/Android/web project.</p>
<p>One of the recent additions to Parse is the cloud code system which allows you to run code on their servers, included in that are a number of modules for interacting with other web services.</p>

            <a href="/blog/2013/02/25/parse-plus-sendgrid-equals-equals-contact-forms-for-static-sites/" class="more-link">
              Continue →
            </2a>
          
        </div>


</article>




  <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  
	<div class="meta">
          
<div class="date">

<time datetime="2013-02-25T11:01:00.000Z"
      
      data-updated="true"
       itemprop="datePublished">
  Feb 25 2013
</time>





</div>

          


          
	</div>
        <h1 class="title" itemprop="name">
          <a href="/blog/2013/02/25/n-things-i-want-to-see-in-ios-7-number-1/" itemprop="url">
            n Things I want to see in iOS 7 - #1</a>
        </h1>
        <div class="entry-content" itemprop="articleBody">
          
            <p>Here‘s the first in a series of blog posts about things I’d like to see in iOS7 - some are areas that I think need improving (from experience developing apps), some are more broad and about possibilities that would make the platform stronger. The first couple, today, are general fix-its; born from recent experience:- </p>
<ul>
<li><p>Fix UILocalNotifications; having recently worked on an app which needed to implement reminders (with associated actions), UILocalNotifications was the only real option (I didn‘t want to use push notifications because the user might be offline, and Reminders.app and EventKit don’t allow you to launch straight into your app). The problem is that the granularity of repeats for UILocalNotifications is very coarse, plus there is a limit of 64 per app. I ended up with a solution that grouped notifications into half hour time slots, which worked for that app, but really a lot of pain could have been avoided with finer grained control of repeats and no hard limits.</p>
</li>
<li><p>Git + Storyboards / Xibs playing nice - I like Xibs and Storyboards; they suit the way that I think, and give me a way of prototyping and iterating rapidly through adding real functionality in only a little longer than it takes to do in wireframe. The biggest problem is that they really don‘t work well with SCM primarily because they don’t merge nicely. This is annoying with Xibs, but really hard work with Storyboards which might contain your entire app. I&#39;m not sure exactly what the answer is here, but the boffins at Apple must be able to figure something out!</p>
</li>
</ul>
<p>That&#39;s it for today; more to come.</p>

          
        </div>


</article>




  <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  
	<div class="meta">
          
<div class="date">

<time datetime="2013-02-21T11:55:00.000Z"
      
      data-updated="true"
       itemprop="datePublished">
  Feb 21 2013
</time>





</div>

          


          
	</div>
        <h1 class="title" itemprop="name">
          <a href="/blog/2013/02/21/ios-watch-out-for-shadows/" itemprop="url">
            iOS: Watch out for shadows</a>
        </h1>
        <div class="entry-content" itemprop="articleBody">
          
            <p>Quick tip … when working with CALayer shadows, its useful to set <strong>shouldRasterize</strong> to <em>YES</em> - this helps with performance (along with setting the <strong>shadowPath</strong>). The problem is that it also rasterises everything else in the layer, including all the text - which then looks awful. There are a couple of options … </p>
<ol>
<li><p>set the rasterization scale (thus ensuring the rasterization is done at correct scale for the device - retina/non-retina):  </p>
<figure class="highlight lang-objc"><table><tr><td class="gutter"><pre>1
</pre></td><td class="code"><pre>layer.rasterizationScale = <span class="string">[[UIScreen mainScreen] scale]]</span>;
</pre></td></tr></table></figure>
</li>
<li><p>or move the shadow into its own layer and adding that as a sublayer.</p>
</li>
</ol>
<p>Both options work - it depends on what your specific use case is, as to which is going to be better for your app.</p>

          
        </div>


</article>




  <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  
	<div class="meta">
          
<div class="date">

<time datetime="2013-01-15T12:33:00.000Z"
      
      data-updated="true"
       itemprop="datePublished">
  Jan 15 2013
</time>





</div>

          


          
	</div>
        <h1 class="title" itemprop="name">
          <a href="/blog/2013/01/15/new-era-cube-video/" itemprop="url">
            New Era Cube video</a>
        </h1>
        <div class="entry-content" itemprop="articleBody">
          
            <p>A video of the New Era Cube iOS app in action on iPad.</p>

            <a href="/blog/2013/01/15/new-era-cube-video/" class="more-link">
              Continue →
            </2a>
          
        </div>


</article>




  <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  
	<div class="meta">
          
<div class="date">

<time datetime="2013-01-14T15:57:00.000Z"
      
      data-updated="true"
       itemprop="datePublished">
  Jan 14 2013
</time>





</div>

          


          
	</div>
        <h1 class="title" itemprop="name">
          <a href="/blog/2013/01/14/static-websites/" itemprop="url">
            Static websites</a>
        </h1>
        <div class="entry-content" itemprop="articleBody">
          
            <p>Having spent the last 14 or so years building complex PHP driven CMS (and other dynamic) systems, its funny how nowadays I&#39;m passing off much of that to 3rd parties eg: <a href="http://parse.com" target="_blank">Parse.com</a> or 3rd party applications <a href="http://wordpress.org" target="_blank">Wordpress</a>.</p>
<p>Part of this is that I&#39;m focussing on other things (mostly native iOS development), partly because the whole landscape is changing; but also because “applications” like Octopress and Jekyll are finding a sweet spot between being dynamic (the site is generated on the fly) and static (everything is hard coded).</p>
<p>By working with a pre-processor, I get much of the flexibility of templates, document fragments etc but end up with a static website which can be served very very quickly.</p>
<p>Using client side scripting (Javascript) to add interactive features, perhaps in conjuction with service providers (like the aforementioned Parse.com), we can have the best of both worlds.</p>
<p>We&#39;ll see!</p>
<p>by Andy</p>

          
        </div>


</article>




</div>

<nav id="pagenavi">
    
    
        <a href="/page/2/" class="next">
          Next
        </a>
    
    <div class="center">
      <a href="archives">Blog Archives</a>
    </div>
</nav>
</div>
	</div>
        <footer id="footer" class="inner">
          Copyright © 2013 - Brothers Bennett - Powered by <a href="https://github.com/tommy351/hexo">Hexo</a><br>
- Ported theme <a href="https://github.com/nuklly/hexo-theme-greyshade">GreyShade</a> -
        </footer>
        
<script src="/js/slash.js"></script>
<script src="/js/jquery.imagesloaded.min.js"></script>
<script src="/js/gallery.js"></script>


<script type="text/javascript">
  var disqus_shortname = 'steamshiftblog';

  (function(){
    var dsq = document.createElement('script');
    dsq.type = 'text/javascript';
    dsq.async = true;
    dsq.src = '//' + disqus_shortname + '.disqus.com/count.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  }());
  </script>






<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
(function($){
  $('.fancybox').fancybox();
})(jQuery);
</script>




      </div><!-- mid-col -->
    </div><!-- container -->
</body>
</html>
