<?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>Little Green Software &#187; Programming</title>
	<atom:link href="http://littlegreensoftware.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://littlegreensoftware.com</link>
	<description>Developer of custom apps for smartphones, tablets and web</description>
	<lastBuildDate>Wed, 21 Dec 2011 15:05:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Tips for using Google Calendar with iCal and iPhone</title>
		<link>http://littlegreensoftware.com/google-calendar-tips-ical-iphone/</link>
		<comments>http://littlegreensoftware.com/google-calendar-tips-ical-iphone/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 21:45:49 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://littlegreensoftware.com/?p=718</guid>
		<description><![CDATA[Sometimes, it&#8217;s the little things.  Things that make your life just a little bit easier to manage. A while back I figured out how to get my primary calendars, hosted by Google, synced with my iPhone and my desktop calendar application, iCal.  Yesterday I made some adjustments so that now the shared calendars I&#8217;m subscribed to [...]]]></description>
			<content:encoded><![CDATA[<p><!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Arial} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Arial; min-height: 15.0px} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Arial; color: #134070} p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Arial; color: #500150; min-height: 15.0px} p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Arial; color: #500150} span.s1 {text-decoration: underline ; color: #134070} span.s2 {text-decoration: underline} -->Sometimes, it&#8217;s the little things.  Things that make your life just a little bit easier to manage. A while back I figured out how to get my primary calendars, hosted by Google, synced with my iPhone and my desktop calendar application, iCal.  Yesterday I made some adjustments so that now the <strong><em>shared</em></strong> calendars I&#8217;m subscribed to are also synced with iPhone calendar and my iCal. Here are the links that were most helpful in case anyone else wants to do the same.</p>
<ul>
<li>I use Google Calendar as my primary personal calendar.  How do I subscribe to a public calendar feed (e.g. <a href="http://bullcityforward.org/calendar/">Bull City Forward</a>) so that it appears in my Google Calendar?  <a href="http://www.google.com/support/calendar/bin/answer.py?hl=en-GB&amp;answer=37100">Here&#8217;s how</a>.</li>
<li>I use Google Calendar as my primary personal calendar.  How can I access it via my iOS device? <a href="http://www.google.com/support/mobile/bin/topic.py?topic=14252">Here&#8217;s how</a>.</li>
<li><a href="http://www.google.com/support/mobile/bin/topic.py?topic=14252"></a>I use Google Calendar as my primary personal calendar and access it via my iOS device.  How can I view the other Google calendars I&#8217;m subscribed to (e.g. public or private shared event calendars) on my iOS device? <a href="http://www.google.com/support/mobile/bin/answer.py?hl=en&amp;answer=151674">Here&#8217;s how</a>.</li>
<li><a href="http://www.google.com/support/mobile/bin/answer.py?hl=en&amp;answer=151674"></a>I use Google Calendar as my primary personal calendar.  How can I access it and other calendars I&#8217;m subscribed to  with iCal or Mozilla Sunbird? <a href="http://www.google.com/support/calendar/bin/answer.py?answer=99358">Here&#8217;s how</a>.</li>
<li><a href="http://www.google.com/support/calendar/bin/answer.py?answer=99358"></a>I use Google Calendar as my primary personal calendar.  How can I access it and other calendars I&#8217;m subscribed to with Microsoft Outlook? <a href="http://www.google.com/support/calendar/bin/answer.py?hl=en-GB&amp;answer=98563">Here&#8217;s how</a>.</li>
</ul>
<p>Hope this is helpful!  It was kind of a pain to set up but I&#8217;m hopeful I will now be able to avoid booking appointments that conflict with events I want to attend.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://littlegreensoftware.com/google-calendar-tips-ical-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Document-based Dynamic Table Views</title>
		<link>http://littlegreensoftware.com/document-based-dynamic-table-views/</link>
		<comments>http://littlegreensoftware.com/document-based-dynamic-table-views/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 20:17:36 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://littlegreensoftware.com/?p=140</guid>
		<description><![CDATA[The iPhone application I'm developing uses a Property List as the fundamental data structure for all content in the application. In this article I discuss my solution for viewing and editing the plist document in an attractive, easily customizable format.]]></description>
			<content:encoded><![CDATA[<p>The iPhone application I&#8217;m developing uses a <acronym title="A Property List is a type of XML document that supports representing all of the basic Core Foundation data structures (arrays, dictionaries, strings, numbers, etc). All of those data structures have built in methods to serialize to or from a Property List (plist), making plists a powerful and extremely convenient mechanism for managing data. See the Property List Programming Guide for more information.">Property List (plist)</acronym> as the fundamental data structure for all app content. The application&#8217;s job is to present the plist document to the user in an attractive format, and to allow editing of the document.</p>
<p>Apple has already solved this problem; the <acronym title="See The Settings Bundle documentation for more information.">Settings Bundle</acronym> in an iPhone application is a plist file. The Settings app built into the iPhone OS displays a hierarchy of views that allow you to view and edit this Settings Bundle. I imagine one could gain some good insight if Apple were to release the source code for the Settings.app, or a sample based on that application. Meanwhile, we are on our own.</p>
<p>When I first began thinking about a good design for this application I thought of XSL style sheets. An XSL style sheet turns an XML document into a visual representation, typically an HTML document rendered by a browser. I desired an analogous system for my app. The style sheet concept is an ideal worth striving for, but as a model it is slightly too simplistic because there&#8217;s no good equivalent to the browser in the analogy. So instead of translating the document into another document, we will translate the document into code that defines a view.</p>
<p>This conceptual model can be applied to any view, but I chose to use a hierarchy of table views because table views — especially the &#8220;grouped&#8221; style table view — provide a good basic structure to the view.  A table view is comprised of an array of sections, and each section has an array of rows. I defined a <code>TableSection</code> class to represent a table section; the table view data source is an array of <code>TableSection</code> instances.  For each <code>UITableViewDelegate</code> and <code>UITableViewDatasource</code> method that defines behavior for a specified section, we use the section argument to look up the corresponding <code>TableSection</code> instance, and delegate the implementation to that instance.</p>
<blockquote><p><code>- (UITableViewCell *)tableView:(UITableView *)aTableView<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cellForRowAtIndexPath:(NSIndexPath *)indexPath<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;TableSection* tableSection = [tableSections objectAtIndex:indexPath.section];<br />
&nbsp;&nbsp;&nbsp;&nbsp;return [tableSection tableView:aTableView cellForRow:indexPath.row];<br />
}</code></p></blockquote>
<p>The pattern is identical for methods such as <code>numberOfRowsInSection</code>, <code>heightForRowAtIndexPath</code>, <code>canEditRowAtIndexPath</code>, and so forth. Thus the behavior is in the hands of the <code>TableSection</code> (or derived class) instance. The instance holds a reference to the view controller and document, from which it can draw whatever data it needs, and to which it can write any changes it desires.</p>
<p>Not every <code>UITableViewDelegate</code> method fits nicely into this paradigm. For example, it is typically easier to implement  the majority of <code>didSelectRowAtIndexPath</code> directly in the view controller class. To facilitate identification of the  <code>TableSection</code> instance a user has selected, I added an integer tag property to <code>TableSection</code>, identical to the tag property in the <code>UIView</code> class.</p>
<p>With the combination of the delegation of some methods and use of the tag property in other methods, we now have a very flexible document-based view setup. The power of this setup became clear once I began developing a library of <code>TableSection</code> subclasses.</p>
<ul>
<li><strong><code>ButtonTableSection</code></strong> implements a basic clickable button. When the row is selected, it is treated as as a button-press. The action is implemented in the <code>didSelectRowAtIndexPath</code> method; the button may be identified by the section tag.</li>
<li><strong><code>MultirowTableSection</code></strong> indexes into an array object in the document instead of of drawing data directly from root level of the document as the <code>TableSection</code> base class does.</li>
<li><strong><code>CheckboxTableSection</code></strong> allows toggling of a set of non-exclusive boolean options in the document.</li>
<li><strong><code>RadioTableSection</code></strong> allows setting a variable to one of several allowed values.</li>
</ul>
<p>For the <code>UITableViewDatasource</code> delegate methods that define the appearance of a particular cell, the <code>TableSection</code> delegates the behavior yet again to a cell class, <code>TableCell</code>, derived from <code>UITableViewCell</code>.  <code>TableCell</code> makes use of a <a href="http://www.llamagraphics.com/drupal/blogs/samalone/2008/10/01/iphone-dev-simplifying-table-cell-creation">technique described on the Llamagraphics blog</a> that generalizes the logic for obtaining an instance of the cell class. <code>TableCell</code> also defines a method called <code>setupCellForDocument</code> that is responsible for configuring the cell instance with the data in the specified document.</p>
<p>Once I announce more details of my application I will post some screenshots. For now I hope other developers find this design inspires insight for your own document-based apps. I look forward to your feedback!</p>
]]></content:encoded>
			<wfw:commentRss>http://littlegreensoftware.com/document-based-dynamic-table-views/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/19 queries in 0.006 seconds using apc
Object Caching 265/303 objects using apc

Served from: littlegreensoftware.com @ 2012-02-05 11:29:07 -->
