<?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>Cocoanetics &#187; Parts</title>
	<atom:link href="http://www.cocoanetics.com/category/parts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cocoanetics.com</link>
	<description>Our DNA is written in Objective-C</description>
	<lastBuildDate>Sat, 18 May 2013 06:19:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F&amp;language=en_US&amp;category=text&amp;title=Cocoanetics&amp;description=Our+DNA+is+written+in+Objective-C&amp;tags=blog" type="text/html" />
		<item>
		<title>Ziner is using DTCoreText</title>
		<link>http://www.cocoanetics.com/2012/11/ziner-is-using-dtcoretext/</link>
		<comments>http://www.cocoanetics.com/2012/11/ziner-is-using-dtcoretext/#comments</comments>
		<pubDate>Sat, 10 Nov 2012 18:56:13 +0000</pubDate>
		<dc:creator>Drops</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.cocoanetics.com/?p=7220</guid>
		<description><![CDATA[The developer of an upcoming Google Reader client wanted to share the following with me, and &#8211; with his permission &#8211; also with you dear reader. I&#8217;m Jay Zhao, the developer of Ziner and I&#8217;m very happy to tell you that DTCoreText is great!  Thank you for writing such a great library! Ziner uses DTCoreText everywhere! DTCoreText is my open source solution for parsing HTML and rendering attributed text from it. Built on top of it is my commercial component for rich text editing DTRichTextEditor. Jay Zhao continues: Ziner is a Google Reader client for iPad. Yes, another Google Reader client, but Ziner is much faster and more beautiful. You can smoothly scroll through articles as fast as you can without encounting any lag. Tested by myself, Ziner is  faster than Reeder, Flipboard, Zite, Google Currents, Feedly, Pluse and probably anything else that uses UIWebView. During the early days of developing, I was searching for a way to render RSS articles. I tried UIWebView, but It was slow and its memory footprint was huge. Then I found DTCoreText, which is much faster than UIWebView. And because the HTML usage of RSS feeds are often very simple,  DTCoreText fits perfectly in rendering RSS feeds. Ziner is now in its Beta stage (going to be released at the end of this month) and you can get it here http://tflig.ht/NNKr8t to try it out, I&#8217;ll be honoured to have you as a Beta tester! Thank you again Oliver Drobnik! Without DTCoreText, Ziner will be impossible, hats off to you! Jay Zhao. Developer of Ziner. Pictures of Ziner. All rendered by DTCoreText!]]></description>
				<content:encoded><![CDATA[<p>The developer of an upcoming Google Reader client wanted to share the following with me, and &#8211; with his permission &#8211; also with you dear reader.</p>
<blockquote><p>I&#8217;m Jay Zhao, the developer of Ziner and I&#8217;m very happy to tell you that <strong>DTCoreText</strong> is great!  Thank you for writing such a great library!</p>
<p>Ziner uses DTCoreText everywhere!</p></blockquote>
<p><a href="https://github.com/Cocoanetics/DTCoreText">DTCoreText</a> is my open source solution for parsing HTML and rendering attributed text from it. Built on top of it is my commercial component for rich text editing <a href="http://www.cocoanetics.com/parts/dtrichtexteditor/">DTRichTextEditor</a>.</p>
<p><span id="more-7220"></span></p>
<div id="more-7220"></div>
<div class="inner_ad_block">
<div id="advman-7" class="widget Advman_Widget">
<h3 class="widgettitle"></h3>
<p><!-- BuySellAds.com Zone Code --></p>
<div id="bsap_1260346" class="bsarocks bsap_fc3166ea4a479e0fdb4251fbe92a1219"></div>
<p><!-- End BuySellAds.com Zone Code --></div>
</div>
<p>Jay Zhao continues:</p>
<p>Ziner is a Google Reader client for iPad. Yes, another Google Reader client, but Ziner is much faster and more beautiful. You can smoothly scroll through articles as fast as you can without encounting any lag. Tested by myself, Ziner is  faster than Reeder, Flipboard, Zite, Google Currents, Feedly, Pluse and probably anything else that uses UIWebView.</p>
<p>During the early days of developing, I was searching for a way to render RSS articles. I tried UIWebView, but It was slow and its memory footprint was huge. Then I found DTCoreText, which is much faster than UIWebView. And because the HTML usage of RSS feeds are often very simple,  DTCoreText fits perfectly in rendering RSS feeds.</p>
<p>Ziner is now in its Beta stage (going to be released at the end of this month) and you can get it here <a href="http://tflig.ht/NNKr8t">http://tflig.ht/NNKr8t</a> to try it out, I&#8217;ll be honoured to have you as a Beta tester!</p>
<p>Thank you again Oliver Drobnik! Without DTCoreText, Ziner will be impossible, hats off to you!</p>
<p>Jay Zhao.<br />
Developer of Ziner.</p>
<p>Pictures of Ziner. All rendered by DTCoreText!</p>

<a href='http://www.cocoanetics.com/2012/11/ziner-is-using-dtcoretext/%e5%b1%8f%e5%b9%95%e5%bf%ab%e7%85%a7-2012-11-09-6-28-15-pm/' title='屏幕快照 2012-11-09 6.28.15 PM'><img src="http://i2.wp.com/www.cocoanetics.com/files/屏幕快照-2012-11-09-6.28.15-PM.png?resize=150%2C150" class="attachment-thumbnail" alt="屏幕快照 2012-11-09 6.28.15 PM" /></a>
<a href='http://www.cocoanetics.com/2012/11/ziner-is-using-dtcoretext/%e5%b1%8f%e5%b9%95%e5%bf%ab%e7%85%a7-2012-11-09-6-28-33-pm/' title='屏幕快照 2012-11-09 6.28.33 PM'><img src="http://i0.wp.com/www.cocoanetics.com/files/屏幕快照-2012-11-09-6.28.33-PM.png?resize=150%2C150" class="attachment-thumbnail" alt="屏幕快照 2012-11-09 6.28.33 PM" /></a>
<a href='http://www.cocoanetics.com/2012/11/ziner-is-using-dtcoretext/%e5%b1%8f%e5%b9%95%e5%bf%ab%e7%85%a7-2012-11-09-6-29-28-pm/' title='屏幕快照 2012-11-09 6.29.28 PM'><img src="http://i0.wp.com/www.cocoanetics.com/files/屏幕快照-2012-11-09-6.29.28-PM.png?resize=150%2C150" class="attachment-thumbnail" alt="屏幕快照 2012-11-09 6.29.28 PM" /></a>
<a href='http://www.cocoanetics.com/2012/11/ziner-is-using-dtcoretext/%e5%b1%8f%e5%b9%95%e5%bf%ab%e7%85%a7-2012-11-09-6-32-03-pm/' title='屏幕快照 2012-11-09 6.32.03 PM'><img src="http://i0.wp.com/www.cocoanetics.com/files/屏幕快照-2012-11-09-6.32.03-PM.png?resize=150%2C150" class="attachment-thumbnail" alt="屏幕快照 2012-11-09 6.32.03 PM" /></a>

 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=7220&amp;md5=68498367d89b8d0ff6c0ffecfebee520" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2012/11/ziner-is-using-dtcoretext/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2012%2F11%2Fziner-is-using-dtcoretext%2F&amp;language=en_GB&amp;category=text&amp;title=Ziner+is+using+DTCoreText&amp;description=The+developer+of+an+upcoming+Google+Reader+client+wanted+to+share+the+following+with+me%2C+and+%26%238211%3B+with+his+permission+%26%238211%3B+also+with+you+dear+reader.+I%26%238217%3Bm+Jay+Zhao%2C+the...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Time-Limited Demo of Our Components</title>
		<link>http://www.cocoanetics.com/2012/08/time-limited-demo-of-our-components/</link>
		<comments>http://www.cocoanetics.com/2012/08/time-limited-demo-of-our-components/#comments</comments>
		<pubDate>Tue, 21 Aug 2012 08:37:06 +0000</pubDate>
		<dc:creator>Drops</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.cocoanetics.com/?p=6900</guid>
		<description><![CDATA[I&#8217;m happy to announce today that we will begin to make available test versions of our components so that you can try them out in your apps. This is possible with the help of our Jenkins build server which installs a &#8220;time bomb&#8221; on every nightly build of the components. This limits the utility of the static universal frameworks to 30 days of testing. Of course you can download a new copy as often as you like to further extend the testing time. But you cannot publish any production apps with that. Our best-selling component is DTRichTextEditor and also by far the most complex because of the multiple sub-projects. Here&#8217;s a guide how to get set up for evaluating the component. There is a DTRichTextEditorDemo host project available on GitHub. Except for the framework &#8211; which we still need to download &#8211; this is a fully functioning app. Download a fresh copy of  http://beta.cocoanetics.com/demo/DTRichTextEditor.embeddedframework.zip and unzip it. This is an embedded framework because of the DTLoupe.bundle which contains the resources for the magifying glass. The framework itself is also contained in there. The reason for this is that you simply drag the embeddedframework folder into Xcode and it does the right things with what it finds. The resources will be copied to the app bundle, the static universal library will be linked into your app binary. So you drag the folder into your project. You want to copy all files into your project folder as well as assign them to the target. This action achieves several things at the same time: Copies the library and bundle into the project tree Adds the bundle to the &#8220;Copy Bundle Resources&#8221; build phase Adds the library to the &#8220;Link Binary with Libraries&#8221; build phase Adds &#8220;$(SRCROOT)/DTRichTextEditor.embeddedframework&#8221; to the &#8220;Framework Search Paths&#8221; build setting We do not need to set up any additional header search paths because all headers required can be found inside the framework&#8217;s headers folder. Finally, I recommend adding the import for the global DTRichTextEditor.h to the PCH file like so: #ifdef __OBJC__ #import &#60;UIKit/UIKit.h&#62; #import &#60;Foundation/Foundation.h&#62; #import &#60;DTRichTextEditor/DTRichTextEditor.h&#62; #endif That&#8217;s all it takes. (I hope) The Demo is set up to add some rich Hello World text. Due to the amount of buttons added to the toolbar I made it iPad-only for now so that I didn&#8217;t have to invent a user interface suitable for iPhones, too. B, I, U, H are Bold, Italic, Underlined and Highlighted. L,C, R, J are Left-, Center-, Right-aligned and Justified paragraph styles. The 1. and + are an incomplete implementation of list-support. The photo inserts a picture from the photo album. The smiley button inserts an inline smiley graphic. And the URL button shows how to turn some text into a hyperlink. I am happy to accept your pull requests for nicer UI in exchange for discounts on the component. I&#8217;m especially looking for a font picker and style popup like Apple has it in Pages for iOS. Conclusion With this guide and by looking at the demo project you should be able to evaluate the component in the context of your own apps. Then when you&#8217;re ready to purchase a full license you simply remove the framework and replace it with the original source code as a sub-project. Now that I have figured out the process end-to-end I will make more and more components available this way. Let me know if you have any preference which components I should make available as time-limited demo next. Otherwise I&#8217;ll approach them by number of recent sales.]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m happy to announce today that we will begin to make available test versions of our components so that you can try them out in your apps. This is possible with the help of our Jenkins build server which installs a &#8220;time bomb&#8221; on every nightly build of the components. This limits the utility of the static universal frameworks to 30 days of testing. Of course you can download a new copy as often as you like to further extend the testing time. But you cannot publish any production apps with that.</p>
<p>Our best-selling component is <a href="http://www.cocoanetics.com/parts/dtrichtexteditor/">DTRichTextEditor</a> and also by far the most complex because of the multiple sub-projects. Here&#8217;s a guide how to get set up for evaluating the component.</p>
<p><span id="more-6900"></span></p>
<div id="more-6900"></div>
<div class="inner_ad_block">
<div id="advman-7" class="widget Advman_Widget">
<h3 class="widgettitle"></h3>
<p><!-- BuySellAds.com Zone Code --></p>
<div id="bsap_1260346" class="bsarocks bsap_fc3166ea4a479e0fdb4251fbe92a1219"></div>
<p><!-- End BuySellAds.com Zone Code --></div>
</div>
<p>There is a DTRichTextEditorDemo host project <a href="https://github.com/Cocoanetics/DTRichTextEditorDemo">available on GitHub</a>. Except for the framework &#8211; which we still need to download &#8211; this is a fully functioning app.</p>
<p>Download a fresh copy of <!--?xml version="1.0" encoding="UTF-8" standalone="no"?--> <a href="http://beta.cocoanetics.com/demo/DTRichTextEditor.embeddedframework.zip">http://beta.cocoanetics.com/demo/DTRichTextEditor.embeddedframework.zip</a> and unzip it.</p>
<p><a href="http://i0.wp.com/www.cocoanetics.com/files/Screen-Shot-2012-08-21-at-10.05.16-AM.png"><img class="alignnone size-full wp-image-6901" title="Embedded Framework" src="http://i0.wp.com/www.cocoanetics.com/files/Screen-Shot-2012-08-21-at-10.05.16-AM.png?resize=437%2C173" alt="" data-recalc-dims="1" /></a></p>
<p>This is an embedded framework because of the DTLoupe.bundle which contains the resources for the magifying glass. The framework itself is also contained in there. The reason for this is that you simply drag the embeddedframework folder into Xcode and it does the right things with what it finds. The resources will be copied to the app bundle, the static universal library will be linked into your app binary.</p>
<p>So you drag the folder into your project.</p>
<p><a href="http://i1.wp.com/www.cocoanetics.com/files/Screen-Shot-2012-08-21-at-10.13.16-AM.png"><img class="alignnone size-full wp-image-6903" title="Screen Shot 2012-08-21 at 10.13.16 AM" src="http://i1.wp.com/www.cocoanetics.com/files/Screen-Shot-2012-08-21-at-10.13.16-AM.png?resize=342%2C132" alt="" data-recalc-dims="1" /></a></p>
<p>You want to copy all files into your project folder as well as assign them to the target.</p>
<p><a href="http://i0.wp.com/www.cocoanetics.com/files/Screen-Shot-2012-08-21-at-10.15.33-AM.png"><img class="alignnone size-full wp-image-6907" title="Add to project" src="http://i0.wp.com/www.cocoanetics.com/files/Screen-Shot-2012-08-21-at-10.15.33-AM.png?resize=547%2C171" alt="" data-recalc-dims="1" /></a></p>
<p>This action achieves several things at the same time:</p>
<ul>
<li>Copies the library and bundle into the project tree</li>
<li>Adds the bundle to the &#8220;Copy Bundle Resources&#8221; build phase</li>
<li>Adds the library to the &#8220;Link Binary with Libraries&#8221; build phase</li>
<li>Adds &#8220;$(SRCROOT)/DTRichTextEditor.embeddedframework&#8221; to the &#8220;Framework Search Paths&#8221; build setting</li>
</ul>
<p>We do not need to set up any additional header search paths because all headers required can be found inside the framework&#8217;s headers folder.</p>
<p>Finally, I recommend adding the import for the global DTRichTextEditor.h to the PCH file like so:</p>
<pre>#ifdef __OBJC__
   #import &lt;UIKit/UIKit.h&gt;
   #import &lt;Foundation/Foundation.h&gt;
   #import &lt;DTRichTextEditor/DTRichTextEditor.h&gt;
#endif</pre>
<p>That&#8217;s all it takes. (I hope) The Demo is set up to add some rich Hello World text.</p>
<p><a href="http://i2.wp.com/www.cocoanetics.com/files/Screen-Shot-2012-08-21-at-10.26.27-AM.png"><img class="alignnone  wp-image-6908" title="The Demo runs!" src="http://i2.wp.com/www.cocoanetics.com/files/Screen-Shot-2012-08-21-at-10.26.27-AM.png?resize=528%2C682" alt="" data-recalc-dims="1" /></a></p>
<p>Due to the amount of buttons added to the toolbar I made it iPad-only for now so that I didn&#8217;t have to invent a user interface suitable for iPhones, too. B, I, U, H are Bold, Italic, Underlined and Highlighted. L,C, R, J are Left-, Center-, Right-aligned and Justified paragraph styles. The 1. and + are an incomplete implementation of list-support. The photo inserts a picture from the photo album. The smiley button inserts an inline smiley graphic. And the URL button shows how to turn some text into a hyperlink.</p>
<p>I am happy to accept your pull requests for nicer UI in exchange for discounts on the component. I&#8217;m especially looking for a font picker and style popup like Apple has it in Pages for iOS. <img src='http://i1.wp.com/www.cocoanetics.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' data-recalc-dims="1" /> </p>
<h3>Conclusion</h3>
<p>With this guide and by looking at the demo project you should be able to evaluate the component in the context of your own apps. Then when you&#8217;re ready to purchase a full license you simply remove the framework and replace it with the original source code as a sub-project. Now that I have figured out the process end-to-end I will make more and more components available this way.</p>
<p>Let me know if you have any preference which components I should make available as time-limited demo next. Otherwise I&#8217;ll approach them by number of recent sales.</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=6900&amp;md5=d9645060494829d12537daf493aa3f90" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2012/08/time-limited-demo-of-our-components/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2012%2F08%2Ftime-limited-demo-of-our-components%2F&amp;language=en_GB&amp;category=text&amp;title=Time-Limited+Demo+of+Our+Components&amp;description=I%26%238217%3Bm+happy+to+announce+today+that+we+will+begin+to+make+available+test+versions+of+our+components+so+that+you+can+try+them+out+in+your+apps.+This+is+possible...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>DTRichTextEditor / DTCoreText News</title>
		<link>http://www.cocoanetics.com/2012/02/dtrichtexteditor-dtcoretext-news/</link>
		<comments>http://www.cocoanetics.com/2012/02/dtrichtexteditor-dtcoretext-news/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 14:07:46 +0000</pubDate>
		<dc:creator>Drops</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.cocoanetics.com/?p=5929</guid>
		<description><![CDATA[You might have noticed &#8211; if you follow the DTCoreText project on GitHub &#8211; that I made many changes on this Open Source project. The most recent change was that somebody donated a CocoaPods spec for the project and thus forced me to give it a version number. The reason being that pods are usually pointing to a specific tag in a GitHub repository. This way people using the project via CocoaPods can be certain that they are getting a stable version. So I stumbled into this, but when trying to think of a good version number I could only come up with &#8220;1.0.0&#8243;. DTCoreText has matured sufficiently to call it that. Hey, earlier versions made it into quite a few popular apps, including Float. There are tons of performance improvements, additional features and most importantly the parser has been replaced with libxml2. This makes it both faster and able to deal with any kind of HTML you throw at it. DTCoreText has two parts: first it creates NSAttributedString instances from HTML, second it displays these properly. CATextLayer would be able to take attributed strings, but it ignores paragraph attributes and cannot draw images. DTCoreText  has an ingenious mechanism where you can supply your own UIViews for each attachment. Attachments can be generic &#60;object&#62;s, &#60;video&#62;s or even &#60;img&#62;. DTCoreText takes care of the drawing and leaving some space and then tells you precisely the size you need to provide for your image views. Of course, if you don&#8217;t need any special treatments then images can also be drawn together with the text. What is the connection between DTCoreText and DTRichTextEditor? To make up a rich text editor you need multiple parts which are all in separate projects. To render the display: DTCoreText To accept text input, provide selection and show a loupe: DTRichTextEditor (which includes DTLoupeView) To copy and paste HTML: DTWebArchive DTRichTextEditor is being sold for €500 and includes DTLoupeView priced at €150. You can also purchase the Loupe separately if you don&#8217;t want to full text editing, but just the magnifier. DTWebArchive and DTCoreText are Open Source projects which you can use at no charge, provided that you credit Cocoanetics as authors. You can purchase Non-Attribution Licenses for €75 a piece so that you don&#8217;t have to mention us. Several people have asked me about the exact terms of these Non-Attribution Licenses. I introduced these as a way for developers to sponsor the ongoing development in exchange for not having to mention Cocoanetics in the app. You get a clear conscience and the good feeling to have supported something that saved you hours and hours of work. You get an invoice for your accountant so you can even expense this payment. But I have no way of checking if you do adhere to the terms, or if you use the components without attributing them properly. Hey, it is YOUR KARMA. If my Open Source projects save you a single hour of development time, then the investment in this license should be easily worth it. Of course I would be over the moon if somebody told me that he wanted to purchase 12 such licenses for 12 of his clients. Hey, do what you feel that is fair, ok? If you do the math you&#8217;ll find that this is indeed a bargain: DTCoreText &#8230; €75 DTWebArchive &#8230; €75 DTLoupeView &#8230; €150 DTRichTextEditor &#8230; €200 Something that you cannot get elsewhere &#8230; €500 Actually that gets me thinking, I should maybe increase the prices. I just convinced myself that this is all way too cheap&#8230; DTRichTextEditor Updated, Too Now with DTCoreText gone gold I also updated DTRichTextEditor to include all these great advances. The project too comes with a Demo app that shows how to interact with the component as well as demonstrates how to integrate the editor. The above mentioned components are sub-projects of this with the two Open Source ones being a clone of the GitHub repo on my Subversion server. Technically the demo (or your own app for that matter) only needs to link in the libDTRichTextEditor static library and copy the DTLoupe.bundle (containing the loupe images) into the app bundle. If you inspect the Demo settings you see how this is done. It is generally wise to add the items you need to the dependencies so that Xcode will know to refresh these if they are modified. In the linked libraries you see a heap of Apple frameworks and that we link in libxml2 as well as the static libDTRichTextEditor which aggregates the objects from the other three projects into one convenient library. HINT: There is one (non-obvious) maneuver you have to know to be able to get a resource bundle created in a sub-project in the list of bundle resources. You need to expand the sub-project [...]]]></description>
				<content:encoded><![CDATA[<p>You might have noticed &#8211; if you follow the DTCoreText project on GitHub &#8211; that I made many changes on this Open Source project. The most recent change was that somebody donated a CocoaPods spec for the project and thus forced me to give it a version number. The reason being that pods are usually pointing to a specific tag in a GitHub repository. This way people using the project via CocoaPods can be certain that they are getting a stable version.</p>
<p>So I stumbled into this, but when trying to think of a good version number I could only come up with &#8220;1.0.0&#8243;. DTCoreText has matured sufficiently to call it that. Hey, earlier versions made it into quite a few popular apps, <a title="Start Floating" href="http://www.cocoanetics.com/2011/07/start-floating/">including Float</a>. There are tons of performance improvements, additional features and most importantly the parser has been replaced with libxml2. This makes it both faster and able to deal with any kind of HTML you throw at it.</p>
<p>DTCoreText has two parts: first it creates NSAttributedString instances from HTML, second it displays these properly. CATextLayer would be able to take attributed strings, but it ignores paragraph attributes and cannot draw images. DTCoreText  has an ingenious mechanism where you can supply your own UIViews for each attachment.</p>
<p><span id="more-5929"></span></p>
<div id="more-5929"></div>
<div class="inner_ad_block">
<div id="advman-7" class="widget Advman_Widget">
<h3 class="widgettitle"></h3>
<p><!-- BuySellAds.com Zone Code --></p>
<div id="bsap_1260346" class="bsarocks bsap_fc3166ea4a479e0fdb4251fbe92a1219"></div>
<p><!-- End BuySellAds.com Zone Code --></div>
</div>
<p>Attachments can be generic &lt;object&gt;s, &lt;video&gt;s or even &lt;img&gt;. DTCoreText takes care of the drawing and leaving some space and then tells you precisely the size you need to provide for your image views. Of course, if you don&#8217;t need any special treatments then images can also be drawn together with the text.</p>
<h3>What is the connection between DTCoreText and DTRichTextEditor?</h3>
<p>To make up a rich text editor you need multiple parts which are all in separate projects.</p>
<ul>
<li>To render the display: <a href="https://github.com/Cocoanetics/DTCoreText">DTCoreText</a></li>
<li>To accept text input, provide selection and show a loupe: <a href="http://www.cocoanetics.com/parts/DTRichTextEditor/">DTRichTextEditor</a> (which includes <a href="http://www.cocoanetics.com/parts/DTLoupeView/">DTLoupeView</a>)</li>
<li>To copy and paste HTML: <a href="https://github.com/Cocoanetics/DTWebArchive">DTWebArchive</a></li>
</ul>
<p>DTRichTextEditor is being sold for €500 and includes DTLoupeView priced at €150. You can also purchase the Loupe separately if you don&#8217;t want to full text editing, but just the magnifier.</p>
<div>DTWebArchive and DTCoreText are Open Source projects which you can use at no charge, provided that you credit Cocoanetics as authors. You can purchase Non-Attribution Licenses for €75 a piece so that you don&#8217;t have to mention us.</div>
<p>Several people have asked me about the exact terms of these Non-Attribution Licenses. I introduced these as a way for developers to sponsor the ongoing development in exchange for not having to mention Cocoanetics in the app. You get a clear conscience and the good feeling to have supported something that saved you hours and hours of work. You get an invoice for your accountant so you can even expense this payment.</p>
<p>But I have no way of checking if you do adhere to the terms, or if you use the components without attributing them properly. Hey, it is YOUR KARMA. If my Open Source projects save you a single hour of development time, then the investment in this license should be easily worth it.</p>
<p>Of course I would be over the moon if somebody told me that he wanted to purchase 12 such licenses for 12 of his clients. Hey, do what you feel that is fair, ok?</p>
<p>If you do the math you&#8217;ll find that this is indeed a bargain:</p>
<p>DTCoreText &#8230; €75<br />
DTWebArchive &#8230; €75<br />
DTLoupeView &#8230; €150<br />
DTRichTextEditor &#8230; €200</p>
<p>Something that you cannot get elsewhere &#8230; €500</p>
<p>Actually that gets me thinking, I should maybe increase the prices. I just convinced myself that this is all way too cheap&#8230;</p>
<h3>DTRichTextEditor Updated, Too</h3>
<p>Now with DTCoreText gone gold I also updated DTRichTextEditor to include all these great advances. The project too comes with a Demo app that shows how to interact with the component as well as demonstrates how to integrate the editor. The above mentioned components are sub-projects of this with the two Open Source ones being a clone of the GitHub repo on my Subversion server.</p>
<p><a href="http://i1.wp.com/www.cocoanetics.com/files/Bildschirmfoto-2012-02-08-um-2.30.53-PM.png"><img class="alignnone size-full wp-image-5932" title="DTRichTextEditor Externals" src="http://i1.wp.com/www.cocoanetics.com/files/Bildschirmfoto-2012-02-08-um-2.30.53-PM.png?resize=286%2C602" alt="" data-recalc-dims="1" /></a></p>
<p>Technically the demo (or your own app for that matter) only needs to link in the libDTRichTextEditor static library and copy the DTLoupe.bundle (containing the loupe images) into the app bundle. If you inspect the Demo settings you see how this is done.</p>
<p><a href="http://i2.wp.com/www.cocoanetics.com/files/Bildschirmfoto-2012-02-08-um-2.38.19-PM.png"><img class="alignnone size-full wp-image-5934" title="Settings" src="http://i2.wp.com/www.cocoanetics.com/files/Bildschirmfoto-2012-02-08-um-2.38.19-PM.png?resize=600%2C740" alt="" data-recalc-dims="1" /></a></p>
<p>It is generally wise to add the items you need to the dependencies so that Xcode will know to refresh these if they are modified. In the linked libraries you see a heap of Apple frameworks and that we link in libxml2 as well as the static libDTRichTextEditor which aggregates the objects from the other three projects into one convenient library.</p>
<p><strong>HINT:</strong> There is one (non-obvious) maneuver you have to know to be able to get a resource bundle created in a sub-project in the list of bundle resources. You need to expand the sub-project so that you can see the products group (yellow folder). Then choose the project root to see the targets. Finally drag the bundle product from the sub-project into the &#8220;Copy Bundle Resources&#8221;. Xcode is smart enough to know where to copy the product from.</p>
<p>With the above setup Xcode will build all necessary parts for the one or two necessary architectures and merge it all together nicely. For further tips regarding what you need to know when using Sub-Projects refer to my earlier article on <a title="Sub-Projects in Xcode" href="http://www.cocoanetics.com/2011/12/sub-projects-in-xcode/">Sub-Projects</a> and <a title="Helping Xcode Find Library Headers" href="http://www.cocoanetics.com/2012/01/helping-xcode-find-library-headers/">Header Magic</a>.</p>
<h3>Conclusion</h3>
<p>I happen to like the concept of self-contained pieces very much and what I learned over the past few weeks of how to do it right enabled me to use them in a large scale component as DTRichTextEditor, bringing together multiple bits and pieces.</p>
<p>Of course development will go on, mostly on the Open Source elements. And there are several items still missing that I am guilty of procrastinating. I want  to provide a time-limited binary version of the framework for testing and evaluation. There are many items on the to do list for DTCoreText itself. I need a better quick start guide to do justice to the dozens of users who are funding the development efforts. And there really should be some AppleDoc-style documentation.</p>
<p>While I do like writing, I don&#8217;t like writing documentation as much. So I&#8217;ll do that when I get around to it&#8230; <img src='http://i1.wp.com/www.cocoanetics.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' data-recalc-dims="1" /> </p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=5929&amp;md5=64697f1af206355ce59202cb4df6ec8b" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2012/02/dtrichtexteditor-dtcoretext-news/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2012%2F02%2Fdtrichtexteditor-dtcoretext-news%2F&amp;language=en_GB&amp;category=text&amp;title=DTRichTextEditor+%2F+DTCoreText+News&amp;description=You+might+have+noticed+%26%238211%3B+if+you+follow+the+DTCoreText+project+on+GitHub+%26%238211%3B+that+I+made+many+changes+on+this+Open+Source+project.+The+most+recent+change+was+that...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Component Development Contest</title>
		<link>http://www.cocoanetics.com/2011/10/component-development-contest/</link>
		<comments>http://www.cocoanetics.com/2011/10/component-development-contest/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 08:56:37 +0000</pubDate>
		<dc:creator>Drops</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.cocoanetics.com/?p=5623</guid>
		<description><![CDATA[Component Marketplace BinPress announced a development contest for mobile components, running through November 26th. The top three spots are rewarded with $20,000 in cash and prizes. The judging period will run for 14 days after the end of the contest, and I&#8217;m happy to announce that I was approached to be one of 4 judges. So you don&#8217;t have to worry about competing against me! Of course that does not mean that flattery will get you anywhere, just because you know me. Entries will be judged based on the following three criteria: Development style and methodology &#8211; intelligent use of software design techniques and patterns. This includes but not limited to separation of concerns, encapsulation and abstraction, loose-coupling, readability and maintainability; Originality &#8211; how original is the submission. Creativity and originality can compensate for less mature code. On the flip side &#8211; if the submission is in a crowded space, the code level needs to be at the highest possible in order to compete. Usefulness &#8211; how useful is the submission. Creativity is important, but the package must also be useful in the real world. Very useful packages will be graded higher. There are some ideas for components on the site, as well as the complete rules and regulations. Good Luck!]]></description>
				<content:encoded><![CDATA[<p>Component Marketplace <a href="http://www.binpress.com/browse/objective-c?ad=5165">BinPress</a> announced a <a href="http://www.binpress.com/mobilecontest?ad=5165">development contest for mobile components</a>, running through November 26th. The top three spots are rewarded with $20,000 in cash and prizes.</p>
<p>The judging period will run for 14 days after the end of the contest, and I&#8217;m happy to announce that I was approached to be one of 4 judges. So you don&#8217;t have to worry about competing against me! <img src='http://i1.wp.com/www.cocoanetics.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' data-recalc-dims="1" /> </p>
<p>Of course that does not mean that flattery will get you anywhere, just because you know me.</p>
<p><span id="more-5623"></span></p>
<div id="more-5623"></div>
<div class="inner_ad_block">
<div id="advman-7" class="widget Advman_Widget">
<h3 class="widgettitle"></h3>
<p><!-- BuySellAds.com Zone Code --></p>
<div id="bsap_1260346" class="bsarocks bsap_fc3166ea4a479e0fdb4251fbe92a1219"></div>
<p><!-- End BuySellAds.com Zone Code --></div>
</div>
<p>Entries will be judged based on the following three criteria:</p>
<ol>
<li><strong>Development style and methodology</strong> &#8211; intelligent use of software design techniques and patterns. This includes but not limited to separation of concerns, encapsulation and abstraction, loose-coupling, readability and maintainability;</li>
<li><strong>Originality</strong> &#8211; how original is the submission. Creativity and originality can compensate for less mature code. On the flip side &#8211; if the submission is in a crowded space, the code level needs to be at the highest possible in order to compete.</li>
<li><strong>Usefulness</strong> &#8211; how useful is the submission. Creativity is important, but the package must also be useful in the real world. Very useful packages will be graded higher.</li>
</ol>
<p>There are some ideas for components on the site, as well as the complete rules and regulations. Good Luck!</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=5623&amp;md5=6336383ee7f7dc47b8faf20f73046954" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2011/10/component-development-contest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2011%2F10%2Fcomponent-development-contest%2F&amp;language=en_GB&amp;category=text&amp;title=Component+Development+Contest&amp;description=Component+Marketplace+BinPress%C2%A0announced+a+development+contest+for+mobile+components%2C+running+through+November+26th.+The+top+three+spots+are+rewarded+with+%2420%2C000+in+cash+and+prizes.+The+judging+period+will+run...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Announcing Rich Text Editing for Everybody</title>
		<link>http://www.cocoanetics.com/2011/08/announcing-rich-text-editing-for-everybody/</link>
		<comments>http://www.cocoanetics.com/2011/08/announcing-rich-text-editing-for-everybody/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 10:11:23 +0000</pubDate>
		<dc:creator>Drops</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.cocoanetics.com/?p=5299</guid>
		<description><![CDATA[Today we&#8217;re announcing the accelerated availability program for DTRichTextEditorView a view that combines the richness of NSAttributedString+HTML with UITextInput to give you the editing capabilities you need to change text editing on iOS forever. The component has reached a status where it actually makes sense to have people start implementing it in prototypes and BETAs of their apps to gather the necessary feedback for polishing the API and find out features that are missing to allow for your special use cases to work with that as well. That final stage should be concluding before the end of August 2011. Find out what features are already implemented, which ones are still missing and how you can get your hands on it today. These are the currently implemented features and what is still not in there: set the contents of the editor view either from an NSAttributedString or HTML move cursor by long pressing, circular loupe move selection handles by long pressing or dragging them, rectangular loupe change selection with hardware keyboard, cursor keys and change selection holding Shift enter text via on-screen or hardware keyboard support for entering text that requires marking, e.g. japanese characters support for adding images either inline or in their own paragraph Auto-Completion implemented (where it suggests a word while you are typing) Auto-Correction &#8211; NOT YET  (where a suspected misspelled word has a red dotted underline) Toggling of bold, italic and underlined Your own custom views over links, videos or images Scrolling capability, the editor is a UIScrollView subclass that does not override the delegate Pasteboard, cut/copy/paste plain text, post NSURL or UIImage. NOT YET: copy rich text to and from the component, because there is no native format Context menu. TO ADD: support for your own menu items to show up after selecting text Here is a video demo that I made some time ago. The component has progressed quite a bit since then, but this shows you the basic features. http://www.youtube.com/watch?v=JDvdzoeCTuw I wouldn&#8217;t try to use this for very long documents yet because there some work still remains to do partial lay outing of an attributed string and merging the results into an existing display. But for most regular use cases it should work well. For your purchase price of 500 Euros you get unlimited access to the SVN repo where the component is being developed and you can start implementing it right away. I will be working with you to iron out any problems that might be remaining. There is already one pilot app that&#8217;s being developed with this pre-release version, but it is now necessary to include more developers for the stated reasons as well as financing the continued development. To order, send me an e-mail with your invoice address. As usual I will be sending you a PDF invoice and after payment (PayPal or bank transfer) you will immediately get access to the component and demo app. Note that EU companies need to provide a VAT ID. Private persons have to be charged 20% VAT on top of the purchase price.]]></description>
				<content:encoded><![CDATA[<p>Today we&#8217;re announcing the accelerated availability program for DTRichTextEditorView a view that combines the richness of <a href="https://github.com/Cocoanetics/DTCoreText">NSAttributedString+HTML</a> with UITextInput to give you the editing capabilities you need to change text editing on iOS forever.</p>
<p>The component has reached a status where it actually makes sense to have people start implementing it in prototypes and BETAs of their apps to gather the necessary feedback for polishing the API and find out features that are missing to allow for your special use cases to work with that as well. That final stage should be concluding before the end of August 2011.</p>
<p>Find out what features are already implemented, which ones are still missing and how you can get your hands on it today.</p>
<p><span id="more-5299"></span></p>
<div id="more-5299"></div>
<div class="inner_ad_block">
<div id="advman-7" class="widget Advman_Widget">
<h3 class="widgettitle"></h3>
<p><!-- BuySellAds.com Zone Code --></p>
<div id="bsap_1260346" class="bsarocks bsap_fc3166ea4a479e0fdb4251fbe92a1219"></div>
<p><!-- End BuySellAds.com Zone Code --></div>
</div>
<p>These are the currently implemented features and what is still not in there:</p>
<ul>
<li>set the contents of the editor view either from an NSAttributedString or HTML</li>
<li>move cursor by long pressing, circular loupe</li>
<li>move selection handles by long pressing or dragging them, rectangular loupe</li>
<li>change selection with hardware keyboard, cursor keys and change selection holding Shift</li>
<li>enter text via on-screen or hardware keyboard</li>
<li>support for entering text that requires marking, e.g. japanese characters</li>
<li>support for adding images either inline or in their own paragraph</li>
<li>Auto-Completion implemented (where it suggests a word while you are typing)</li>
<li>Auto-Correction &#8211; NOT YET  (where a suspected misspelled word has a red dotted underline)</li>
<li>Toggling of bold, italic and underlined</li>
<li>Your own custom views over links, videos or images</li>
<li>Scrolling capability, the editor is a UIScrollView subclass that does not override the delegate</li>
<li>Pasteboard, cut/copy/paste plain text, post NSURL or UIImage. NOT YET: copy rich text to and from the component, because there is no native format</li>
<li>Context menu. TO ADD: support for your own menu items to show up after selecting text</li>
</ul>
<p>Here is a video demo that I made some time ago. The component has progressed quite a bit since then, but this shows you the basic features.</p>
<p><a href="http://www.youtube.com/watch?v=JDvdzoeCTuw&#038;fmt=18">http://www.youtube.com/watch?v=JDvdzoeCTuw</a></p>
<p>I wouldn&#8217;t try to use this for very long documents yet because there some work still remains to do partial lay outing of an attributed string and merging the results into an existing display. But for most regular use cases it should work well.</p>
<p>For your purchase price of <strong>500 Euros</strong> you get unlimited access to the SVN repo where the component is being developed and you can start implementing it right away. I will be working with you to iron out any problems that might be remaining. There is already one pilot app that&#8217;s being developed with this pre-release version, but it is now necessary to include more developers for the stated reasons as well as financing the continued development.</p>
<p>To order, <a href="mailto:oliver@drobnik.com?subject=DTRichTextEditorView">send me an e-mail</a> with your invoice address. As usual I will be sending you a PDF invoice and after payment (PayPal or bank transfer) you will immediately get access to the component and demo app. Note that EU companies need to provide a VAT ID. Private persons have to be charged 20% VAT on top of the purchase price.</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=5299&amp;md5=2ab20aefa27b1d42847fd13297a5b795" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2011/08/announcing-rich-text-editing-for-everybody/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2011%2F08%2Fannouncing-rich-text-editing-for-everybody%2F&amp;language=en_GB&amp;category=text&amp;title=Announcing+Rich+Text+Editing+for+Everybody&amp;description=Today+we%26%238217%3Bre+announcing+the+accelerated+availability+program+for+DTRichTextEditorView+a+view+that+combines+the+richness+of+NSAttributedString%2BHTML+with+UITextInput+to+give+you+the+editing+capabilities+you+need+to+change+text...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>NovelRank App Shows Off DTChartView</title>
		<link>http://www.cocoanetics.com/2011/07/novelrank-app-shows-off-dtchartview/</link>
		<comments>http://www.cocoanetics.com/2011/07/novelrank-app-shows-off-dtchartview/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 19:26:52 +0000</pubDate>
		<dc:creator>Drops</dc:creator>
				<category><![CDATA[Parts]]></category>
		<category><![CDATA[DTChartView]]></category>

		<guid isPermaLink="false">http://www.cocoanetics.com/?p=5241</guid>
		<description><![CDATA[Similar to us developers who keep scouring  sales rank information on sites like Applyzer there is a service for book authors. It goes by the name NovelRank and it lets authors track their book sales on Amazon.com. Dave Wooldrige from Electric Butterfly (also a renowned book author in the iOS sphere) took it upon himself to create a beautiful iPhone client for the NovelRank service and released this just today, for FREE. I&#8217;m specifically mentioning this here on my blog because Dave implemented my DTChartView component to get interactive scrollable charts for the ranking data. Dave needed what only DTChartView could offer: endless scrollable charts that he could adapt to the app&#8217;s unique style. It should integrate, not stick out like a sore thumb. See for yourself, don&#8217;t they look beautiful? In his own words, Dave describes the convenience of getting my component for this task: Thanks for making DTChartView! It definitely saved me a lot of development time!  :-) - Dave Wooldridge This is the third major app making use of this part, the first one being Baby Bubbles and the second HandyEtat. Here are a couple more screen shots, all showing a customized DTChartView. The top view is the default look, the bottom one shows some customization. DTChartView can do line charts, bar charts and charts with stacked bars, you can adjust the line colors, fill the area above and below the line with different gradients and you even get touch handling for when you want to show data point details via tapping. Contrary to other chart components this one is meant to show a horizontally scrollable chart that gets dynamically drawn as your scroll, all super-smooth. This works because drawing is done on a CATiledLayer. You feed it by implementing a couple of delegate methods and you&#8217;re done!]]></description>
				<content:encoded><![CDATA[<p>Similar to us developers who keep scouring  sales rank information on sites like Applyzer there is a service for book authors. It goes by the name <a href="http://www.novelrank.com">NovelRank</a> and it lets authors track their book sales on Amazon.com.</p>
<p>Dave Wooldrige from <a href="http://www.ebutterfly.com">Electric Butterfly</a> (also a renowned book author in the iOS sphere) took it upon himself to create a <a href="http://www.ebutterfly.com/novelrank/">beautiful iPhone client</a> for the NovelRank service and <a href="http://itunes.apple.com/us/app/novelrank-amazon-sales-rank/id423938573?mt=8">released</a> this just today, for FREE.</p>
<p>I&#8217;m specifically mentioning this here on my blog because Dave implemented my <a href="http://www.cocoanetics.com/parts/dtchartview/">DTChartView</a> component to get interactive scrollable charts for the ranking data.</p>
<p><span id="more-5241"></span></p>
<div id="more-5241"></div>
<div class="inner_ad_block">
<div id="advman-7" class="widget Advman_Widget">
<h3 class="widgettitle"></h3>
<p><!-- BuySellAds.com Zone Code --></p>
<div id="bsap_1260346" class="bsarocks bsap_fc3166ea4a479e0fdb4251fbe92a1219"></div>
<p><!-- End BuySellAds.com Zone Code --></div>
</div>
<p>Dave needed what only DTChartView could offer: endless scrollable charts that he could adapt to the app&#8217;s unique style. It should integrate, not stick out like a sore thumb.</p>
<p>See for yourself, don&#8217;t they look beautiful?</p>
<p><a href="http://i2.wp.com/www.cocoanetics.com/files/novelrank_ss3_rankhistory.jpg"><img class="alignnone size-full wp-image-5242" title="novel rank rank history" src="http://i2.wp.com/www.cocoanetics.com/files/novelrank_ss3_rankhistory.jpg?resize=322%2C462" alt="" data-recalc-dims="1" /></a></p>
<p>In his own words, Dave describes the convenience of getting my component for this task:</p>
<blockquote><p>Thanks for making DTChartView! It definitely saved me a lot of development time!  :-)<br />
- Dave Wooldridge</p></blockquote>
<p>This is the third major app making use of this part, the first one being <a href="http://itunes.apple.com/us/app/babybubbles-baby-log-diary/id330769473?mt=8">Baby Bubbles</a> and the second <a href="http://itunes.apple.com/de/app/handyetat/id298771815?mt=8">HandyEtat</a>. Here are a couple more screen shots, all showing a customized DTChartView. The top view is the default look, the bottom one shows some customization.</p>
<p><a href="http://i1.wp.com/www.cocoanetics.com/files/mzl.uggdjnrj.320x480-75.jpg"><img class="alignnone size-full wp-image-5243" title="HandyEtat" src="http://i1.wp.com/www.cocoanetics.com/files/mzl.uggdjnrj.320x480-75.jpg?resize=480%2C320" alt="" data-recalc-dims="1" /></a></p>
<p><a href="http://i1.wp.com/www.cocoanetics.com/files/mzl.hmhukqyd.320x480-75.jpg"><img class="alignnone size-full wp-image-5244" title="BabyBubbles" src="http://i1.wp.com/www.cocoanetics.com/files/mzl.hmhukqyd.320x480-75.jpg?resize=480%2C320" alt="" data-recalc-dims="1" /></a></p>
<p><a href="http://www.cocoanetics.com/parts/dtchartview/">DTChartView</a> can do line charts, bar charts and charts with stacked bars, you can adjust the line colors, fill the area above and below the line with different gradients and you even get touch handling for when you want to show data point details via tapping.</p>
<p>Contrary to other chart components this one is meant to show a horizontally scrollable chart that gets dynamically drawn as your scroll, all super-smooth. This works because drawing is done on a CATiledLayer. You feed it by implementing a couple of delegate methods and you&#8217;re done!</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=5241&amp;md5=fc8c373d5ea8552ac9c04b936177bb13" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2011/07/novelrank-app-shows-off-dtchartview/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2011%2F07%2Fnovelrank-app-shows-off-dtchartview%2F&amp;language=en_GB&amp;category=text&amp;title=NovelRank+App+Shows+Off+DTChartView&amp;description=Similar+to+us+developers+who+keep+scouring+%C2%A0sales+rank+information+on+sites+like+Applyzer+there+is+a+service+for+book+authors.+It+goes+by+the+name+NovelRank+and+it+lets...&amp;tags=DTChartView%2Cblog" type="text/html" />
	</item>
		<item>
		<title>DTLoupe &#8211; Reverse-engineering Apple&#8217;s Loupes</title>
		<link>http://www.cocoanetics.com/2011/06/dtloupe-reverse-engineering-apples-loupes/</link>
		<comments>http://www.cocoanetics.com/2011/06/dtloupe-reverse-engineering-apples-loupes/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 17:09:10 +0000</pubDate>
		<dc:creator>Drops</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.cocoanetics.com/?p=5216</guid>
		<description><![CDATA[I am working on a CoreText-based rich text editor at the moment. That means employing two primary technologies: the UITextInput protocol as well as rendering the formatted text with CoreText. Unfortunately Apple has forgotten to add selection and loupe mechanics to UITextInput, so we have to build these ourselves if we want to get the same look&#38;feel as the built-in stuff. So to get the selection handling and loupe we see developers go two paths: either they distort UIWebView with fancy JavaScript or they struggle with implementing their own code. These approaches lead to a wide variety of differently looking and behaving loupes and selection mechanics. I have contacted Apple by all means available to me and I&#8217;m hoping that there will be an official method to get the selection mechanics and loupe down the road. But until there is, I let me present an interim solution for this problem. This will be a component I call DTLoupe and it have many potential applications besides being used in an editor to select text. Like providing a magnifier in a context when pinch-to-zoom does not make sense. Apple&#8217;s loupe consists of several parts that are combined with a zoomed rendering of the view around your finger. The layers bottom to top are: a &#8220;lo&#8221; image forms the base a mask masks the inner shape of the loupe a 1.25x enlarged rendering of the view is put into this space a &#8220;high&#8221; image adds the shine and general frame Apple seems to prefer use of a masking image over a clipping path. We believe this to be the case because masking is probably much faster than clipping because it can be entirely done on the GPU, being essentially a pixel-by-pixel operation, whereas with clipping there needs to be some extra logic to decide whether a pixel is still in the permitted area or not. Quite a bit of experimentation was necessary to get it looking right, including the showing and hiding animation. Thankfully there is an amazing project on GitHub UIKit-Artwork-Extractor that helped us learn about &#8220;how they did it&#8221; by letting us inspect the images that are part of the whole effect. A note at the side, Apple is extensively using PNGs for all sorts of UI elements, so you might want to do the same, especially if you have a designer that can provide all these individual items for you to assemble. My friend Michael Kaye was hard at work to research all the nuts and bolts and the result is coming along very nicely. There are a couple of other projects that provided some inspiration, like the OmniGroup framework. If you ask me now &#8220;why did you re-invent the wheel if OmniUI already has a loupe?&#8221; the answer is simple: it does not look like and does not behave like the original. And on top of that they never updated their solution for retina displays, which makes it impossible to use in a modern project where Retina-support is a must-have. Now for the demo: http://www.youtube.com/watch?v=4L2IE2YD1wg Work is ongoing to polish but I just had show off the fabulous work that Michael did over the past few days. Next up is actually hooking up the touch handling for moving the cursor, extending the selection and handling the context menu. &#160;]]></description>
				<content:encoded><![CDATA[<p>I am working on a CoreText-based <a title="Rich Text Editing on iOS" href="http://www.cocoanetics.com/2011/01/rich-text-editing-on-ios/">rich text editor</a> at the moment. That means employing two primary technologies: the UITextInput protocol as well as rendering the formatted text with CoreText. Unfortunately Apple has forgotten to add selection and loupe mechanics to UITextInput, so we have to build these ourselves if we want to get the same look&amp;feel as the built-in stuff.</p>
<p>So to get the selection handling and loupe we see developers go two paths: either they distort UIWebView with fancy JavaScript or they struggle with implementing their own code. These approaches lead to a wide variety of differently looking and behaving loupes and selection mechanics. I have contacted Apple by all means available to me and I&#8217;m hoping that there will be an official method to get the selection mechanics and loupe down the road.</p>
<p>But until there is, I let me present an interim solution for this problem. This will be a component I call <strong>DTLoupe</strong> and it have many potential applications besides being used in an editor to select text. Like providing a magnifier in a context when pinch-to-zoom does not make sense.</p>
<p><span id="more-5216"></span></p>
<div id="more-5216"></div>
<div class="inner_ad_block">
<div id="advman-7" class="widget Advman_Widget">
<h3 class="widgettitle"></h3>
<p><!-- BuySellAds.com Zone Code --></p>
<div id="bsap_1260346" class="bsarocks bsap_fc3166ea4a479e0fdb4251fbe92a1219"></div>
<p><!-- End BuySellAds.com Zone Code --></div>
</div>
<p>Apple&#8217;s loupe consists of several parts that are combined with a zoomed rendering of the view around your finger. The layers bottom to top are:</p>
<ul>
<li>a &#8220;lo&#8221; image forms the base</li>
<li>a mask masks the inner shape of the loupe</li>
<li>a 1.25x enlarged rendering of the view is put into this space</li>
<li>a &#8220;high&#8221; image adds the shine and general frame</li>
</ul>
<p>Apple seems to prefer use of a masking image over a clipping path. We believe this to be the case because masking is probably much faster than clipping because it can be entirely done on the GPU, being essentially a pixel-by-pixel operation, whereas with clipping there needs to be some extra logic to decide whether a pixel is still in the permitted area or not.</p>
<p>Quite a bit of experimentation was necessary to get it looking right, including the showing and hiding animation. Thankfully there is an amazing project on GitHub <a href="https://github.com/0xced/UIKit-Artwork-Extractor">UIKit-Artwork-Extractor</a> that helped us learn about &#8220;how they did it&#8221; by letting us inspect the images that are part of the whole effect. A note at the side, Apple is extensively using PNGs for all sorts of UI elements, so you might want to do the same, especially if you have a <a title="Design by a Friend" href="http://www.cocoanetics.com/2011/05/design-by-a-friend/">designer</a> that can provide all these individual items for you to assemble.</p>
<p>My friend <a href="http://www.cocoapedia.org/wiki/Michael_Kaye">Michael Kaye</a> was hard at work to research all the nuts and bolts and the result is coming along very nicely. There are a couple of other projects that provided some inspiration, like the <a href="http://github.com/omnigroup/OmniGroup/tree/master/Frameworks/OmniUI/iPad/Examples/TextEditor/">OmniGroup framework</a>. If you ask me now &#8220;why did you re-invent the wheel if OmniUI already has a loupe?&#8221; the answer is simple: it does not look like and does not behave like the original. And on top of that they never updated their solution for retina displays, which makes it impossible to use in a modern project where Retina-support is a must-have.</p>
<p>Now for the demo:</p>
<p><a href="http://www.youtube.com/watch?v=4L2IE2YD1wg&#038;fmt=18">http://www.youtube.com/watch?v=4L2IE2YD1wg</a></p>
<p>Work is ongoing to polish but I just had show off the fabulous work that Michael did over the past few days. Next up is actually hooking up the touch handling for moving the cursor, extending the selection and handling the context menu.</p>
<p>&nbsp;</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=5216&amp;md5=13d4337f9e6120e0e4ce2d9b293a88f2" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2011/06/dtloupe-reverse-engineering-apples-loupes/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2011%2F06%2Fdtloupe-reverse-engineering-apples-loupes%2F&amp;language=en_GB&amp;category=text&amp;title=DTLoupe+%26%238211%3B+Reverse-engineering+Apple%26%238217%3Bs+Loupes&amp;description=I+am+working+on+a+CoreText-based+rich+text+editor+at+the+moment.+That+means+employing+two+primary+technologies%3A+the+UITextInput+protocol+as+well+as+rendering+the+formatted+text+with+CoreText....&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>App Shoutout for May</title>
		<link>http://www.cocoanetics.com/2011/05/app-shoutout-for-may/</link>
		<comments>http://www.cocoanetics.com/2011/05/app-shoutout-for-may/#comments</comments>
		<pubDate>Mon, 30 May 2011 22:22:07 +0000</pubDate>
		<dc:creator>Drops</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.cocoanetics.com/?p=5132</guid>
		<description><![CDATA[Every once in a while (monthly?) I like to give a shout out to apps that are making good use of components that came from my store. Radar Ticino by Alessandro Rugeri uses DTBannerManager for Ads theVault by BestApps uses DTPinLockController to secure the passwords ███████████ by ████████████ uses DTClusterMaker to unclutter maps Ultimate Password Manager by Jean-Francois Martin uses DTPinLockController and DTSplashExpander. If you have any released app that I have not mentioned so far, let me know, but please only if you are allowed to do so. I hate receiving mails with information that I cannot publish.]]></description>
				<content:encoded><![CDATA[<p>Every once in a while (monthly?) I like to give a shout out to apps that are making good use of components that came from my store.</p>
<ul>
<li><a href="http://itunes.apple.com/us/app/radar-ticino/id348351216?mt=8">Radar Ticino</a> by Alessandro Rugeri uses <a href="http://www.cocoanetics.com/parts/dtbannermanager/">DTBannerManager</a> for Ads</li>
<li><a href="http://itunes.apple.com/us/app/thevault-secure-storage-passwords/id436982968?mt=8">theVault</a> by BestApps uses <a href="http://www.cocoanetics.com/parts/dtpinlockcontroller/">DTPinLockController</a> to secure the passwords</li>
<li>███████████ by ████████████ uses <a href="http://www.cocoanetics.com/parts/dtclustermaker/">DTClusterMaker</a> to unclutter maps</li>
<li><a href="http://itunes.apple.com/us/app/ultimate-password-manager/id317837271?mt=8">Ultimate Password Manager</a> by Jean-Francois Martin uses <a href="http://www.cocoanetics.com/parts/dtpinlockcontroller/">DTPinLockController</a> and <a href="http://www.cocoanetics.com/parts/dtsplashextender/">DTSplashExpander</a>.</li>
</ul>
<p>If you have any released app that I have not mentioned so far, let me know, but please only if you are allowed to do so. I hate receiving mails with information that I cannot publish.</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=5132&amp;md5=139d28abb6ab9b11a3427abcb35b1fbe" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2011/05/app-shoutout-for-may/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2011%2F05%2Fapp-shoutout-for-may%2F&amp;language=en_GB&amp;category=text&amp;title=App+Shoutout+for+May&amp;description=Every+once+in+a+while+%28monthly%3F%29+I+like+to+give+a+shout+out+to+apps+that+are+making+good+use+of+components+that+came+from+my+store.+Radar+Ticino+by...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>DTCards &#8211; Universalizing an iPhone App</title>
		<link>http://www.cocoanetics.com/2011/01/dtcards-universalizing-an-iphone-app/</link>
		<comments>http://www.cocoanetics.com/2011/01/dtcards-universalizing-an-iphone-app/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 13:13:36 +0000</pubDate>
		<dc:creator>Drops</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.cocoanetics.com/?p=4673</guid>
		<description><![CDATA[Ever since the iPad came out I&#8217;ve been giving the occasional thought as to how I could universalize my existing iPhone apps. Generally the problem is that you have view controllers that work well on the resolution of the iPhone, but if you simply display them full screen on iPad they look weird. So I&#8217;ve started to work on a view controller that would allow me to reuse my iPhone view controllers by displaying them not in full screen but as distinct cards. The idea is that you would use the same DTCardsViewController as root in your app and then depending on which device it runs on will either show the cards filling the iPhone screen or by laying them out to better fill the iPad screen. In this article I want to give you a brief demo of where my R&#038;D stands so far. For the first phase I decided to keep things simple and just have a method to push a card &#8211; in the form of a view controller &#8211; onto the scrolling table. Optionally each card can have a second view controller to control the backside. Cards would flip to reveal their backside. On iPad the cards get a black border and rounded corners, via this method: @implementation UIView &#40;Cards&#41; &#160; - &#40;void&#41;addRoundedCornersToCardWithRadius:&#40;CGFloat&#41;radius &#123; CALayer *layer = self.layer; layer.borderColor = &#91;UIColor blackColor&#93;.CGColor; layer.borderWidth = 1.0; layer.cornerRadius = radius; layer.masksToBounds = YES; self.clipsToBounds = YES; &#125; &#160; @end The cards view controller knows how to keep track of which card is centermost and if you rotate the iPad it will center on this card. If the user pinches open on a card, then this the view controller will move to closeup mode sliding out the neighboring cards. Here you could enhance the interface by enlarging image views or adding additional details for which there was no space on the 1:1 view. Pinch-Close goes back to the stream of cards. Have a look at this YouTube video where I demonstrate the working technology so far. Sorry if there&#8217;s no audio, that&#8217;s entirely YouTube&#8217;s fault. I don&#8217;t quite know what the best user interactions would be, so if you have some ideas please share them in the comments. Do you know any scenario that would benefit from such a dual universal view controller?]]></description>
				<content:encoded><![CDATA[<p>Ever since the iPad came out I&#8217;ve been giving the occasional thought as to how I could universalize my existing iPhone apps. Generally the problem is that you have view controllers that work well on the resolution of the iPhone, but if you simply display them full screen on iPad they look weird.</p>
<p>So I&#8217;ve started to work on a view controller that would allow me to reuse my iPhone view controllers by displaying them not in full screen but as distinct cards. The idea is that you would use the same DTCardsViewController as root in your app and then depending on which device it runs on will either show the cards filling the iPhone screen or by laying them out to better fill the iPad screen.</p>
<p>In this article I want to give you a brief demo of where my R&#038;D stands so far. </p>
<p><span id="more-4673"></span></p>
<div id="more-4673"></div>
<div class="inner_ad_block">
<div id="advman-7" class="widget Advman_Widget">
<h3 class="widgettitle"></h3>
<p><!-- BuySellAds.com Zone Code --></p>
<div id="bsap_1260346" class="bsarocks bsap_fc3166ea4a479e0fdb4251fbe92a1219"></div>
<p><!-- End BuySellAds.com Zone Code --></div>
</div>
<p>For the first phase I decided to keep things simple and just have a method to push a card &#8211; in the form of a view controller &#8211; onto the scrolling table. Optionally each card can have a second view controller to control the backside. Cards would flip to reveal their backside.</p>
<p>On iPad the cards get a black border and rounded corners, via this method:</p>

<div class="wp_codebox"><table><tr id="p46732"><td class="code" id="p4673code2"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">@implementation</span> UIView <span style="color: #002200;">&#40;</span>Cards<span style="color: #002200;">&#41;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>addRoundedCornersToCardWithRadius<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>CGFloat<span style="color: #002200;">&#41;</span>radius
<span style="color: #002200;">&#123;</span>
	CALayer <span style="color: #002200;">*</span>layer <span style="color: #002200;">=</span> self.layer;
	layer.borderColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIColor blackColor<span style="color: #002200;">&#93;</span>.CGColor;
	layer.borderWidth <span style="color: #002200;">=</span> <span style="color: #2400d9;">1.0</span>;
	layer.cornerRadius <span style="color: #002200;">=</span> radius;
	layer.masksToBounds <span style="color: #002200;">=</span> <span style="color: #a61390;">YES</span>;
	self.clipsToBounds <span style="color: #002200;">=</span> <span style="color: #a61390;">YES</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #a61390;">@end</span></pre></td></tr></table></div>

<p>The cards view controller knows how to keep track of which card is centermost and if you rotate the iPad it will center on this card. If the user pinches open on a card, then this the view controller will move to closeup mode sliding out the neighboring cards. Here you could enhance the interface by enlarging image views or adding additional details for which there was no space on the 1:1 view. Pinch-Close goes back to the stream of cards.</p>
<p>Have a look at this YouTube video where I demonstrate the working technology so far. Sorry if there&#8217;s no audio, that&#8217;s entirely YouTube&#8217;s fault.</p>
<p><iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="510" src="http://www.youtube.com/embed/XUpwomt_8Kg" frameborder="0" allowFullScreen></iframe></p>
<p>I don&#8217;t quite know what the best user interactions would be, so if you have some ideas please share them in the comments. Do you know any scenario that would benefit from such a dual universal view controller?</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=4673&amp;md5=3d62f0c5c554a130c823f4a88d9579b4" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2011/01/dtcards-universalizing-an-iphone-app/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2011%2F01%2Fdtcards-universalizing-an-iphone-app%2F&amp;language=en_GB&amp;category=text&amp;title=DTCards+%26%238211%3B+Universalizing+an+iPhone+App&amp;description=Ever+since+the+iPad+came+out+I%26%238217%3Bve+been+giving+the+occasional+thought+as+to+how+I+could+universalize+my+existing+iPhone+apps.+Generally+the+problem+is+that+you+have+view...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Rich Text Editing on iOS</title>
		<link>http://www.cocoanetics.com/2011/01/rich-text-editing-on-ios/</link>
		<comments>http://www.cocoanetics.com/2011/01/rich-text-editing-on-ios/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 21:33:16 +0000</pubDate>
		<dc:creator>Drops</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.cocoanetics.com/?p=4659</guid>
		<description><![CDATA[For the past few days you&#8217;ve see me go on and on about this Open Source Project of mine. Sorry if this got a bit annoying to you but I am very passionate about bringing this functionality to a broad audience because I feel that UIWebView should not be used as much as it is. With the DTAttributedTextView from the GitHub project you can replace most of these and have way more control over the outcome. Apple might finally add support for Rich Text Editing in iOS 5, coming Summer 2011. I suspect that the Pages app on the iPad might be a glorified test case for Apple for that. But even if that indeed comes to our Xcode, it will be end of 2011 that customers will have widely deployed iOS 5 . Today I want to show you something completely different that is using the aforementioned project as a base and extends it to provide Rich Text Editing capability. 40 Required Protocol Methods So I investigated a little bit and found that since 3.2 Apple is exposing the editing protocols to build our own text editing views. UITextInput &#8211; the main editing protocol with about 40 methods in total that you need to implement UIKeyInput &#8211; on this UITextInput is based, it has only 3 methods allowing you to add basic single key input to views UITextInputTraits &#8211; several properties that allow to customize behavior like capitalization and autocorrection An editing view must implement the above protocols, be able to becomeFirstResponder and have userInteraction enabled. You have to implement your own UITextRange and UITextPosition subclasses because different editors might have different values symbolize a certain position or range in a document. The example given is that an HTML document might  have a position in the visible text as well as a position in the HTML code. CoreText now Objective To make it easier on myself I encapsulated CoreText in Objective-C, you find these classes prefixed DTCoreText in the Open Source project. I found it very effective to have both the HTML project as well as my editor project open side by side so that it does not matter where I am making modifications to the display classes. And also the HTML project is benefitting from utility methods that I am adding to DTCoreText. In the HTML project demo there&#8217;s now a &#8220;Debug Frames&#8221; button that lets you toggle showing of all the individual layout elements that CoreText is using: frame, baseline, lines and glyph runs. Characters that have the same attributes make up a glyph run, they alternate in red and green shading. Because you can add any kind of UIView to the DTAttributedContentView as a response to a glyph run you can also do something that you could not do with a web view before: add your own custom views, surrounded by HTML. No longer do you need javascript or Flash to achieve interactive rich text&#8230;. Think of the possibilities, you can now place an object tag in the HTML and then within your app replace this object tag with a fancy interactive view. Or something as simple as an SVG image rendered by another open source component, like SVGQuartzRenderer, SVGKit or CKSVG. DTRichTextEditorView is a subclass of DTAttributedTextView adding all the required methods mentioned above. And then some. For example I also have a blinking cursor view. Working so far are: Cursor Movements Positioning the cursor via tap if you enter text it gets the same formatting as the text where it is inserted if the cursor is scrolled offscreen then entering text scrolls it into the visible area Still missing: Autocorrection already works, but I am still wrestling with getting the rectangle for the selection. There might be a bug on the Retina iPhone simulator not taking into account the scale factor. Selecting/Marking Ranges Pasteboard Integration: Cut, Copy, Paste I&#8217;ve recorded a video to show off some cool features from the Open Source project and also give a tech preview of DTRichTextEditorView. The demo is still missing some sort of format chooser, in the least some buttons to change font and make it bold or italic. But these are simple to add and I will do so once I tackled the harder problems. In the end another interesting question will be how to get HTML back from an NSAttributedString. There are multiple options thinkable. Either you preserve the original HTML and have the editor edit both the NSAttributedString as well as an underlying HTML DOM. Or you generate HTML code from the NSAttributedString. Does it blend? It is my goal with this component to have it be super-easy to implement and allow to super-charge any app that has some sort of editing capability. The possibilities are limitless: Apps to post to blogs or social media HTML [...]]]></description>
				<content:encoded><![CDATA[<p>For the past few days you&#8217;ve see me go on and on about this <a href="https://github.com/Cocoanetics/DTCoreText">Open Source Project</a> of mine. Sorry if this got a bit annoying to you but I am very passionate about bringing this functionality to a broad audience because I feel that UIWebView <a href="http://www.cocoanetics.com/2011/01/uiwebview-must-die/">should not be used as much</a> as it is. With the DTAttributedTextView from the GitHub project you can replace most of these and have way more control over the outcome.</p>
<p>Apple might finally add support for Rich Text Editing in iOS 5, coming Summer 2011. I suspect that the Pages app on the iPad might be a glorified test case for Apple for that. But even if that indeed comes to our Xcode, it will be end of 2011 that customers will have widely deployed iOS 5</p>
<p><img class="size-full wp-image-4662 alignnone" title="Pages Toolbar" src="http://i2.wp.com/www.cocoanetics.com/files/PagesToolbar.png?resize=356%2C36" alt="" data-recalc-dims="1" />.</p>
<p>Today I want to show you something completely different that is using the aforementioned project as a base and extends it to provide Rich Text Editing capability.</p>
<p><span id="more-4659"></span></p>
<div id="more-4659"></div>
<div class="inner_ad_block">
<div id="advman-7" class="widget Advman_Widget">
<h3 class="widgettitle"></h3>
<p><!-- BuySellAds.com Zone Code --></p>
<div id="bsap_1260346" class="bsarocks bsap_fc3166ea4a479e0fdb4251fbe92a1219"></div>
<p><!-- End BuySellAds.com Zone Code --></div>
</div>
<h3>40 Required Protocol Methods</h3>
<p>So I investigated a little bit and found that since 3.2 Apple is exposing the editing protocols to build our own text editing views.</p>
<p><strong>UITextInput</strong> &#8211; the main editing protocol with about 40 methods in total that you need to implement</p>
<p><strong>UIKeyInput</strong> &#8211; on this UITextInput is based, it has only 3 methods allowing you to add basic single key input to views</p>
<p><strong>UITextInputTraits</strong> &#8211; several properties that allow to customize behavior like capitalization and autocorrection</p>
<p>An editing view must implement the above protocols, be able to becomeFirstResponder and have userInteraction enabled.</p>
<p>You have to implement your own UITextRange and UITextPosition subclasses because different editors might have different values symbolize a certain position or range in a document. The example given is that an HTML document might  have a position in the visible text as well as a position in the HTML code.</p>
<h3>CoreText now Objective</h3>
<p>To make it easier on myself I encapsulated CoreText in Objective-C, you find these classes prefixed DTCoreText in the Open Source project. I found it very effective to have both the HTML project as well as my editor project open side by side so that it does not matter where I am making modifications to the display classes. And also the HTML project is benefitting from utility methods that I am adding to DTCoreText.</p>
<p>In the HTML project demo there&#8217;s now a &#8220;Debug Frames&#8221; button that lets you toggle showing of all the individual layout elements that CoreText is using: frame, baseline, lines and glyph runs. Characters that have the same attributes make up a glyph run, they alternate in red and green shading.</p>
<p><a href="http://i1.wp.com/www.cocoanetics.com/files/Screen-shot-2011-01-25-at-10.15.50-PM.png"><img class="alignnone size-full wp-image-4665" title="Debug Frames toggle" src="http://i1.wp.com/www.cocoanetics.com/files/Screen-shot-2011-01-25-at-10.15.50-PM.png?resize=396%2C744" alt="" data-recalc-dims="1" /></a></p>
<p>Because you can add any kind of UIView to the DTAttributedContentView as a response to a glyph run you can also do something that you could not do with a web view before: add your own custom views, surrounded by HTML. No longer do you need javascript or Flash to achieve interactive rich text&#8230;. Think of the possibilities, you can now place an object tag in the HTML and then within your app replace this object tag with a fancy interactive view. Or something as simple as an SVG image rendered by another open source component, like <a href="https://github.com/splashdust/SVGQuartzRenderer">SVGQuartzRenderer</a>, <a href="https://github.com/mattrajca/SVGKit">SVGKit</a> or <a href="https://github.com/cmkilger/CKSVG">CKSVG</a>.</p>
<p><strong>DTRichTextEditorView</strong> is a subclass of DTAttributedTextView adding all the required methods mentioned above. And then some. For example I also have a blinking cursor view.</p>
<p>Working so far are:</p>
<ul>
<li>Cursor Movements</li>
<li>Positioning the cursor via tap</li>
<li>if you enter text it gets the same formatting as the text where it is inserted</li>
<li>if the cursor is scrolled offscreen then entering text scrolls it into the visible area</li>
</ul>
<p><a href="http://i1.wp.com/www.cocoanetics.com/files/Screen-shot-2011-01-25-at-8.35.16-PM.png"><img class="alignnone size-full wp-image-4663" title="Rich Text Editor Demo" src="http://i1.wp.com/www.cocoanetics.com/files/Screen-shot-2011-01-25-at-8.35.16-PM.png?resize=396%2C744" alt="" data-recalc-dims="1" /></a></p>
<p>Still missing:</p>
<ul>
<li>Autocorrection already works, but I am still wrestling with getting the rectangle for the selection. There might be a bug on the Retina iPhone simulator not taking into account the scale factor.</li>
<li>Selecting/Marking Ranges</li>
<li>Pasteboard Integration: Cut, Copy, Paste</li>
</ul>
<p>I&#8217;ve recorded a video to show off some cool features from the Open Source project and also give a tech preview of DTRichTextEditorView. The demo is still missing some sort of format chooser, in the least some buttons to change font and make it bold or italic. But these are simple to add and I will do so once I tackled the harder problems.</p>
<p><iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="510" src="http://www.youtube.com/embed/HI2KWj2Olog" frameborder="0" allowFullScreen></iframe></p>
<p>In the end another interesting question will be how to get HTML back from an NSAttributedString. There are multiple options thinkable. Either you preserve the original HTML and have the editor edit both the NSAttributedString as well as an underlying HTML DOM. Or you generate HTML code from the NSAttributedString.</p>
<h3>Does it blend?</h3>
<p>It is my goal with this component to have it be super-easy to implement and allow to super-charge any app that has some sort of editing capability. The possibilities are limitless:</p>
<ul>
<li>Apps to post to blogs or social media</li>
<li>HTML editors</li>
<li>Note taking apps to allow for highlighting sections and make words bold and italic</li>
<li>E-Mail apps that allow you to use stationary, signatures and rich text</li>
<li>Twitter clients which make links, usernames and hash tags not just clickable but interactive.</li>
</ul>
<p>What are your ideas? Got any apps that could use a &#8220;Rich Upgrade?&#8221;</p>
<p>If you can think of any good use for this component then you have three options. You can be an <strong>early adopter</strong> and purchase this component at an early adopter BETA preview rate. If you cannot afford the cost for this, then I am open to suggestions for <strong>partnerships</strong>. You bring the app, I bring the component and we split the profits. Or if you are looking to do a <strong>free app</strong> then I might be open for supplying the component if the app has a large enough audience.</p>
<p>I am very interested to hear your feedback to this article and the tech demo video.</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=4659&amp;md5=35b3da1629644316b4e759242ebf43d7" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2011/01/rich-text-editing-on-ios/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2011%2F01%2Frich-text-editing-on-ios%2F&amp;language=en_GB&amp;category=text&amp;title=Rich+Text+Editing+on+iOS&amp;description=For+the+past+few+days+you%26%238217%3Bve+see+me+go+on+and+on+about+this+Open+Source+Project+of+mine.+Sorry+if+this+got+a+bit+annoying+to+you+but+I...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>DTBannerManager 1.3</title>
		<link>http://www.cocoanetics.com/2010/10/dtbannermanager-1-3/</link>
		<comments>http://www.cocoanetics.com/2010/10/dtbannermanager-1-3/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 17:25:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=3081</guid>
		<description><![CDATA[After having worked on the official MobFox Framework it was only logical that I would add support for this new ad network to DTBannerManager as well. Well honestly, I actually developed the framework inside of DTBannerManager and when it was done, I made it a static universal framework. And then there was the goal of having a method to allow customers to purchase &#8220;Ad-Freeness&#8221; via an InAppPurchase. As with all IAP stuff you have to create your own UI for it, so I had a friend and designer create dual-resolution artwork for an X-button that you can link with your own IAP code or use DTShop. Have a look at a video demo of these new features that I put on YouTube: http://www.youtube.com/watch?v=RNKRnbJY_qU If you have purchased DTBannerManager source code access before then you find these updates in your repository if you refresh it.]]></description>
				<content:encoded><![CDATA[<p>After having worked on the <a href="http://www.cocoanetics.com/2010/10/mobfox/">official MobFox Framework</a> it was only logical that I would add support for this new ad network to DTBannerManager as well. Well honestly, I actually developed the framework inside of DTBannerManager and when it was done, I made it a static universal framework.</p>
<p>And then there was the goal of having a method to allow customers to purchase &#8220;Ad-Freeness&#8221; via an InAppPurchase. As with all IAP stuff you have to create your own UI for it, so I had a friend and designer create dual-resolution artwork for an X-button that you can link with your own IAP code or use DTShop.</p>
<p>Have a look at a video demo of these new features that I put on YouTube:</p>
<p><a href="http://www.youtube.com/watch?v=RNKRnbJY_qU">http://www.youtube.com/watch?v=RNKRnbJY_qU</a></p>
<p>If you have purchased DTBannerManager source code access before then you find these updates in your repository if you refresh it.</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=3081&amp;md5=26e2e405433da75a618cdda9e8169d31" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2010/10/dtbannermanager-1-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2010%2F10%2Fdtbannermanager-1-3%2F&amp;language=en_GB&amp;category=text&amp;title=DTBannerManager+1.3&amp;description=After+having+worked+on+the+official+MobFox+Framework+it+was+only+logical+that+I+would+add+support+for+this+new+ad+network+to+DTBannerManager+as+well.+Well+honestly%2C+I+actually...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>DTChartView 2.0</title>
		<link>http://www.cocoanetics.com/2010/09/dtchartview-2-0/</link>
		<comments>http://www.cocoanetics.com/2010/09/dtchartview-2-0/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 13:11:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=3052</guid>
		<description><![CDATA[I had originally begun development on my chart class for BabyBubbles, which required customizable charts to display various statistics on whatever babies you might have. At that time all of the view building and logic was contained in a view controller, DTChartViewController. This app was the first to launch with the 1.0 version and I&#8217;ve never had any complaints. When I continued work on iWoman 2.0 I realized that it would make more sense to make the box with the chart a view of its own. Especially because I wanted to have the ability to show a small chart which would zoom to use the full screen when rotating your device. So I got to work on 2.0. Amongst other polishing I wanted to clean up the delegate/datasource interface to use method names that inform the developer that they belong to DTChartView. That&#8217;s how the datasource protocol turned out. You can see that very little is required to get a chart to show, but there is a boatload of options to customize the appearance of the columns and lines. @protocol DTChartDataSource &#160; @required - &#40;NSUInteger&#41;numberOfPointsInChartView:&#40;DTChartView *&#41;chartView; - &#40;CGFloat&#41;maximumValueInChartView:&#40;DTChartView *&#41;chartView; - &#40;CGFloat&#41;chartView:&#40;DTChartView *&#41;chartView valueForPointAtPosition:&#40;DTChartDataPointPosition&#41;position; &#160; @optional - &#40;NSInteger&#41;numberOfLinesInChartView:&#40;DTChartView *&#41;chartView; /* default 1 */ - &#40;CGSize&#41;unitSizeInChartView:&#40;DTChartView *&#41;chartView;; // default: automatically calculated - &#40;CGFloat&#41;minimumValueInChartView:&#40;DTChartView *&#41;chartView; // default: 0 - &#40;NSArray *&#41;chartView:&#40;DTChartView *&#41;chartView arrayOfValuesForBarsAtPosition:&#40;DTChartDataPointPosition&#41;position; &#160; // column grouping - &#40;NSUInteger&#41;chartView:&#40;DTChartView *&#41;chartView groupForColumn:&#40;NSUInteger&#41;column; /* column grouping */ &#160; // customizing look - &#40;UIColor *&#41;chartView:&#40;DTChartView *&#41;chartView backgroundColorBehindPointAtColumn:&#40;NSUInteger&#41;column; /* no fill if not implemented */ - &#40;UIColor *&#41;chartView:&#40;DTChartView *&#41;chartView colorForLineAtIndex:&#40;NSUInteger&#41;index; /* default colors are provided */ - &#40;BOOL&#41;chartView:&#40;DTChartView *&#41;chartView drawCustomBarInRect:&#40;CGRect&#41;barRect onContext:&#40;CGContextRef&#41;context forLineIndex:&#40;NSUInteger&#41;lineIndex; // custom drawing of bars - &#40;BOOL&#41;chartView:&#40;DTChartView *&#41;chartView drawCustomBackgroundInRect:&#40;CGRect&#41;barRect onContext:&#40;CGContextRef&#41;context backgroundType:&#40;DTChartBackgroundType&#41;backgroundType; - &#40;BOOL&#41;chartView:&#40;DTChartView *&#41;chartView drawCustomDataPointAtPoint:&#40;CGPoint&#41;point onContext:&#40;CGContextRef&#41;context position:&#40;DTChartDataPointPosition&#41;position; &#160; // horizontal axis customization - &#40;NSString *&#41;chartView:&#40;DTChartView *&#41;chartView textForLabelInColumn:&#40;NSUInteger&#41;column; - &#40;BOOL&#41;chartView:&#40;DTChartView *&#41;chartView customizeColumnLabel:&#40;UILabel *&#41;label; &#160; // vertical axis label formatting - &#40;NSString *&#41;chartView:&#40;DTChartView *&#41;chartView titleForLabelAtValue:&#40;CGFloat&#41;value; // custom formatting for y-axis labels &#160; // legend - &#40;NSString *&#41;chartView:&#40;DTChartView *&#41;chartView titleForLineAtIndex:&#40;NSUInteger&#41;index; // name for legend &#160; // display of placeholder for empty chart - &#40;UIView *&#41;viewForEmptyChartView:&#40;DTChartView *&#41;chartView; - &#40;NSString *&#41;titleForEmptyChartView:&#40;DTChartView *&#41;chartView; &#160; @end In the meantime another customer found DTChartView and purchased it. Every time this happens, this invigorates me and prompts me to to polish just a bit more. Helmut Neumann took it upon himself to take the 2.0 BETA and add it to the latest version of his successful cellphone usage tracking app. Without any fear or reservation he pointed out all the shortcomings and drove me to iron out all those kinks. So finally, when he got the update approved it was at the same time the seal of approval that I wanted to get to allow myself to release version 2.0. I&#8217;m always happy to hear when customers of the Dr. Touch&#8217;s Parts Store report on how happy my work made them. &#8220;Two months ago i wanted to add Charts to HandyEtat, my well settled cost control app for T-Mobile Germany. I was already using My App Sales and liked the integrated charts. So I was quite happy to find DTChartView in Olivers parts store, espacially when noticing the unbeatable price and license conditions. DTChartView is feature rich, highly customizable and rock solid in execution. Integrating it into my App was &#8220;a piece of cake&#8221;. Oliver showed a great performance on taking over and implementing enhancement requests. The new version of HandyEtat got an overwhelming response from my customers, so I am very pleased with my decision to use DTChartView.&#8221; DTChartView 2.0 is available on my Dr. Touch&#8217;s Parts Store. I&#8217;ve priced it so high because of the enormous amount of work that went into it, knowing well that this would limit the number of apps using it. But on the other hand it makes it a charting solution that can make your app stand apart from the competition.]]></description>
				<content:encoded><![CDATA[<p>I had originally begun development on my chart class for <a href="http://itunes.apple.com/us/app/babybubbles/id330769473?mt=8">BabyBubbles</a>, which required customizable charts to display various statistics on whatever babies you might have. At that time all of the view building and logic was contained in a view controller, DTChartViewController. This app was the first to launch with the 1.0 version and I&#8217;ve never had any complaints.</p>
<p>When I continued work on iWoman 2.0 I realized that it would make more sense to make the box with the chart a view of its own. Especially because I wanted to have the ability to show a small chart which would zoom to use the full screen when rotating your device. So I got to work on 2.0. Amongst other polishing I wanted to clean up the delegate/datasource interface to use method names that inform the developer that they belong to DTChartView.</p>
<p>That&#8217;s how the datasource protocol turned out. You can see that very little is required to get a chart to show, but there is a boatload of options to customize the appearance of the columns and lines.</p>

<div class="wp_codebox"><table><tr id="p30525"><td class="code" id="p3052code5"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">@protocol</span> DTChartDataSource
&nbsp;
@required
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>NSUInteger<span style="color: #002200;">&#41;</span>numberOfPointsInChartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>CGFloat<span style="color: #002200;">&#41;</span>maximumValueInChartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>CGFloat<span style="color: #002200;">&#41;</span>chartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView valueForPointAtPosition<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartDataPointPosition<span style="color: #002200;">&#41;</span>position;
&nbsp;
@optional
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>numberOfLinesInChartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView; <span style="color: #11740a; font-style: italic;">/* default 1 */</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>CGSize<span style="color: #002200;">&#41;</span>unitSizeInChartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView;; <span style="color: #11740a; font-style: italic;">// default: automatically calculated</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>CGFloat<span style="color: #002200;">&#41;</span>minimumValueInChartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView; <span style="color: #11740a; font-style: italic;">// default: 0</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/"><span style="color: #400080;">NSArray</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView arrayOfValuesForBarsAtPosition<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartDataPointPosition<span style="color: #002200;">&#41;</span>position;
&nbsp;
<span style="color: #11740a; font-style: italic;">// column grouping</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>NSUInteger<span style="color: #002200;">&#41;</span>chartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView groupForColumn<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSUInteger<span style="color: #002200;">&#41;</span>column;   <span style="color: #11740a; font-style: italic;">/* column grouping */</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// customizing look</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>UIColor <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView backgroundColorBehindPointAtColumn<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSUInteger<span style="color: #002200;">&#41;</span>column; <span style="color: #11740a; font-style: italic;">/* no fill if not implemented */</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>UIColor <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView colorForLineAtIndex<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSUInteger<span style="color: #002200;">&#41;</span>index;  <span style="color: #11740a; font-style: italic;">/* default colors are provided */</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>chartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView drawCustomBarInRect<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>CGRect<span style="color: #002200;">&#41;</span>barRect onContext<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>CGContextRef<span style="color: #002200;">&#41;</span>context forLineIndex<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSUInteger<span style="color: #002200;">&#41;</span>lineIndex; <span style="color: #11740a; font-style: italic;">// custom drawing of bars</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>chartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView drawCustomBackgroundInRect<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>CGRect<span style="color: #002200;">&#41;</span>barRect onContext<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>CGContextRef<span style="color: #002200;">&#41;</span>context backgroundType<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartBackgroundType<span style="color: #002200;">&#41;</span>backgroundType;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>chartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView drawCustomDataPointAtPoint<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>CGPoint<span style="color: #002200;">&#41;</span>point onContext<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>CGContextRef<span style="color: #002200;">&#41;</span>context position<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartDataPointPosition<span style="color: #002200;">&#41;</span>position;
&nbsp;
<span style="color: #11740a; font-style: italic;">// horizontal axis customization</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView textForLabelInColumn<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSUInteger<span style="color: #002200;">&#41;</span>column;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>chartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView customizeColumnLabel<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UILabel <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>label;
&nbsp;
<span style="color: #11740a; font-style: italic;">// vertical axis label formatting</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView titleForLabelAtValue<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>CGFloat<span style="color: #002200;">&#41;</span>value; <span style="color: #11740a; font-style: italic;">// custom formatting for y-axis labels</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// legend</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView titleForLineAtIndex<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSUInteger<span style="color: #002200;">&#41;</span>index; <span style="color: #11740a; font-style: italic;">// name for legend</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// display of placeholder for empty chart</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>UIView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>viewForEmptyChartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>titleForEmptyChartView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>DTChartView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>chartView;
&nbsp;
<span style="color: #a61390;">@end</span></pre></td></tr></table></div>

<p>In the meantime another customer found DTChartView and purchased it. Every time this happens, this invigorates me and prompts me to to polish just a bit more. Helmut Neumann took it upon himself to take the 2.0 BETA and add it to the latest version of his successful cellphone usage tracking app.</p>
<p>Without any fear or reservation he pointed out all the shortcomings and drove me to iron out all those kinks. So finally, when he got the update approved it was at the same time the seal of approval that I wanted to get to allow myself to release version 2.0.</p>
<p><a href="http://i2.wp.com/www.cocoanetics.com/files/Multi_Diagramm.png"><img class="alignnone size-full wp-image-3053" src="http://i2.wp.com/www.cocoanetics.com/files/Multi_Diagramm.png?resize=384%2C576" alt="" data-recalc-dims="1" /></a></p>
<p>I&#8217;m always happy to hear when customers of the Dr. Touch&#8217;s Parts Store report on how happy my work made them.</p>
<blockquote><p>&#8220;Two months ago i wanted to add Charts to <a href="http://itunes.apple.com/us/app/handyetat/id298771815?mt=8">HandyEtat</a>, my well settled cost control app for T-Mobile Germany. I was already using My App Sales and liked the integrated charts. So I was quite happy to find DTChartView in Olivers parts store, espacially when noticing the unbeatable price and license conditions. DTChartView is feature rich, highly customizable and rock solid in execution. Integrating it into my App was &#8220;a piece of cake&#8221;. Oliver showed a great performance on taking over and implementing enhancement requests. The new version of HandyEtat got an overwhelming response from my customers, so I am very pleased with my decision to use DTChartView.&#8221;</p></blockquote>
<p>DTChartView 2.0 is available on my <a href="http://www.cocoanetics.com/parts-store/">Dr. Touch&#8217;s Parts Store</a>. I&#8217;ve priced it so high because of the enormous amount of work that went into it, knowing well that this would limit the number of apps using it. But on the other hand it makes it a charting solution that can make your app stand apart from the competition.</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=3052&amp;md5=36324b54a22277a96545b3d117e40a23" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2010/09/dtchartview-2-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2010%2F09%2Fdtchartview-2-0%2F&amp;language=en_GB&amp;category=text&amp;title=DTChartView+2.0&amp;description=I+had+originally+begun+development+on+my+chart+class+for+BabyBubbles%2C+which+required+customizable+charts+to+display+various+statistics+on+whatever+babies+you+might+have.+At+that+time+all+of...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Augmented Reality Plane Finder Trumps Charts</title>
		<link>http://www.cocoanetics.com/2010/09/augmented-reality-plane-finder-trumps-charts/</link>
		<comments>http://www.cocoanetics.com/2010/09/augmented-reality-plane-finder-trumps-charts/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 10:20:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=3046</guid>
		<description><![CDATA[Pinkfroot is a small iOS dev shop in the UK who specializes on apps that show planes and ships on maps. I had the author Lee Armstrong on my podcast a while back explaining how they are getting the vehicle telemetry. Increasing numbers of airlines and ships are outfitting their vehicles with transponders that are transmitting data like current speed or destination and there are boatloads of volunteers worldwide who have receivers for these airwaves and share them with Pinkfroot. They had already used my DTAugmentedRealityController part with a bit of success on a Shipfinder app Ships Ahoy!, but naturally this is only interesting for people who at least sometimes have water nearby to gaze at ships on. Most of us iPhone users are living inland and so for every ship we see, there are dozens of planes that pass over our heads. Enter Plane Finder AR. For the first time there is an Augmented Reality app where it actually makes sense to point your iPhone at something and get augmented data for what you are looking at. Granted there are apps showing you names of mountain peaks, but &#8211; honestly &#8211; those don&#8217;t move so much and thus are way less interesting as something that happens to pass over you right now. Plane Finder AR gives you a rotating mini map and labels for the individual planes. These tell you the designations of the planes, ground speed, altitude, origin and destination, and distance from you. It proves to be a great use case for my AR component. If you have the data (the more live the better) you can easily build an enticing app. Just how enticing? Well, let&#8217;s check the charts (courtesy of Applyzer) The audience is downloading this app more than the likes of Tom Tom or CoPilot who had been leading the Navigation Category. Which in my humble opinion makes perfect sense because while navigation is something that you might use every once in a while when driving somewhere, this app makes the air above your current location a more interesting place.]]></description>
				<content:encoded><![CDATA[<p><a href="http://my.pinkfroot.com/">Pinkfroot</a> is a small iOS dev shop in the UK who specializes on apps that show planes and ships on maps. I had the author Lee Armstrong <a href="http://www.cocoanetics.com/2010/01/dr-touch-011-waiting-for-islate/">on my podcast</a> a while back explaining how they are getting the vehicle telemetry. Increasing numbers of airlines and ships are outfitting their vehicles with transponders that are transmitting data like current speed or destination and there are boatloads of volunteers worldwide who have receivers for these airwaves and share them with Pinkfroot.</p>
<p>They had already used my <a href="http://www.cocoanetics.com/parts-store">DTAugmentedRealityController</a> part with a bit of success on a Shipfinder app <a href="http://itunes.apple.com/us/app/ships-ahoy/id351104359?mt=8">Ships Ahoy!</a>, but naturally this is only interesting for people who at least <em>sometimes</em> have water nearby to gaze at ships on. Most of us iPhone users are living inland and so for every ship we see, there are dozens of planes that pass over our heads.</p>
<p>Enter <a href="http://itunes.apple.com/us/app/plane-finder-ar/id390039844?mt=8">Plane Finder AR</a>. For the first time there is an Augmented Reality app where it actually makes sense to point your iPhone at something and get augmented data for what you are looking at. Granted there are apps showing you names of mountain peaks, but &#8211; honestly &#8211; those don&#8217;t move so much and thus are way less interesting as something that happens to pass over you <em>right now</em>.</p>
<p><img class="alignnone size-full wp-image-3047" src="http://i0.wp.com/www.cocoanetics.com/files/mzl.rgzjknqq.320x480-75.jpg?resize=480%2C320" alt="" data-recalc-dims="1" /></p>
<p>Plane Finder AR gives you a rotating mini map and labels for the individual planes. These tell you the designations of the planes, ground speed, altitude, origin and destination, and distance from you. It proves to be a great use case for my AR component. If you have the data (the more live the better) you can easily build an enticing app.</p>
<p>Just how enticing? Well, let&#8217;s check the charts (courtesy of <a href="http://www.applyzer.com">Applyzer</a>)</p>
<p><img class="alignnone size-full wp-image-3048" src="http://i1.wp.com/www.cocoanetics.com/files/Screen-shot-2010-09-18-at-12.15.56-PM.png?resize=330%2C542" alt="" data-recalc-dims="1" /></p>
<p>The audience is downloading this app more than the likes of Tom Tom or CoPilot who had been leading the Navigation Category. Which in my humble opinion makes perfect sense because while navigation is something that you might use every once in a while when driving somewhere, this app makes the air above your current location a more interesting place.</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=3046&amp;md5=cba47742e8f727ad9bee34f4aad8bb71" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2010/09/augmented-reality-plane-finder-trumps-charts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2010%2F09%2Faugmented-reality-plane-finder-trumps-charts%2F&amp;language=en_GB&amp;category=text&amp;title=Augmented+Reality+Plane+Finder+Trumps+Charts&amp;description=Pinkfroot+is+a+small+iOS+dev+shop+in+the+UK+who+specializes+on+apps+that+show+planes+and+ships+on+maps.+I+had+the+author+Lee+Armstrong+on+my+podcast...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>DTBannerManager</title>
		<link>http://www.cocoanetics.com/2010/08/dtbannermanager/</link>
		<comments>http://www.cocoanetics.com/2010/08/dtbannermanager/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 12:42:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=2949</guid>
		<description><![CDATA[You have AdMob ads in your apps? Wondering if you could make a bit more money if you also had iAds were available? DTBannerManager solves this problem for you. It allows for easily adding both networks to your code. Under iOS 4 it will first try to get an iAd because those also pay for just being displayed. If none is available then it automatically switches to AdMob, so your banner space is never wasted. It also features elegant sliding in and out of the banners and is able to display ad banners even over a tab bar controller, so they are always visible for maximum effect. You might argue that there are free ad networks out there who promise to do exactly this for free. So why would you want to get this component from me. Well, from you you get full source code and you see exactly what is happening. Also there is no server-side ad mediation happening that might get you in trouble with Apple. I believe that as developer you don&#8217;t want to involve too many additional parties and introduce too many external dependencies. With DTBannerManager you continue own all parts of your code and have full transparency. What&#8217;s also great is that you can use this component will work on both 3.x and 4.x iOS Versions. This way you can target the broadest possible audience with reaping the benefits of iAds if available. Adding advertising is exceedingly simple: #ifdef FREEVERSION &#91;&#91;DTBannerManager sharedManager&#93; addAdsToViewController:tabBarController&#93;; #endif Then you can just subscribe to the notifications to adjust the viewing area of your view controllers. DTBannerManager is proving it&#8217;s worth already in GeoCorder [FREE]. There was a bug preventing &#8220;clicking through&#8221; in Ads that I have since fixed. The component is available through the Dr. Touch&#8217;s Parts Store.]]></description>
				<content:encoded><![CDATA[<p>You have AdMob ads in your apps? Wondering if you could make a bit more money if you also had iAds were available?</p>
<p>DTBannerManager solves this problem for you. It allows for easily adding both networks to your code. Under iOS 4 it will first try to get an iAd because those also pay for just being displayed. If none is available then it automatically switches to AdMob, so your banner space is never wasted. It also features elegant sliding in and out of the banners and is able to display ad banners even over a tab bar controller, so they are always visible for maximum effect.</p>
<p><img src="http://i0.wp.com/www.cocoanetics.com/files/Screen-shot-2010-08-06-at-2.23.55-PM.png?resize=320%2C120" alt="" class="alignnone size-full wp-image-2946" data-recalc-dims="1" /></p>
<p>You might argue that there are free ad networks out there who promise to do exactly this for free. So why would you want to get this component from me. Well, from you you get full source code and you see exactly what is happening. Also there is no server-side ad mediation happening that might get you in trouble with Apple. I believe that as developer you don&#8217;t want to involve too many additional parties and introduce too many external dependencies. With DTBannerManager you continue own all parts of your code and have full transparency.</p>
<p>What&#8217;s also great is that you can use this component will work on both 3.x and 4.x iOS Versions. This way you can target the broadest possible audience with reaping the benefits of iAds if available.</p>
<p>Adding advertising is exceedingly simple:</p>

<div class="wp_codebox"><table><tr id="p29498"><td class="code" id="p2949code8"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#ifdef FREEVERSION</span>
	<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>DTBannerManager sharedManager<span style="color: #002200;">&#93;</span> addAdsToViewController<span style="color: #002200;">:</span>tabBarController<span style="color: #002200;">&#93;</span>;
<span style="color: #6e371a;">#endif</span></pre></td></tr></table></div>

<p>Then you can just subscribe to the notifications to adjust the viewing area of your view controllers.</p>
<p>DTBannerManager is proving it&#8217;s worth already in <a href="http://www.cocoanetics.com/2010/07/geocorder-1-1-0/">GeoCorder [FREE]</a>. There was a bug preventing &#8220;clicking through&#8221; in Ads that I have since fixed. The component is available through the <a href="http://www.cocoanetics.com/parts-store/">Dr. Touch&#8217;s Parts Store</a>.</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=2949&amp;md5=592aafe597ef64c07c7576e72fafa438" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2010/08/dtbannermanager/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2010%2F08%2Fdtbannermanager%2F&amp;language=en_GB&amp;category=text&amp;title=DTBannerManager&amp;description=You+have+AdMob+ads+in+your+apps%3F+Wondering+if+you+could+make+a+bit+more+money+if+you+also+had+iAds+were+available%3F+DTBannerManager+solves+this+problem+for+you.+It...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>DTCustomSwitch</title>
		<link>http://www.cocoanetics.com/2010/06/dtcustomswitch/</link>
		<comments>http://www.cocoanetics.com/2010/06/dtcustomswitch/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 21:41:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=2631</guid>
		<description><![CDATA[I wanted to use a UISwitch in iWoman to select between Celsius and Fahrenheit for the temperature scale. UISwitch being in my humble opinion the quickest method to switch between two values. Unfortunately Apple does not give us any kind of customization capability. Homick tried to fill this need by making a custom view and providing a photoshop file that you could change. But that&#8217;s not how we do things in Dr. Touchistan. I totally revamped Homick&#8217;s code and brought it up to snuff to what I needed. Most importantly the color and labels needed to be fully customizable IN CODE. DTCustomSwitch is almost entirely written from ground up as a UIControl where you can customize the text and looks of of both labels as you please. Even set the background color. That so far fulfills my needs for iWoman 2.0, but if you have any ideas on how to even more customize it, let me know. Peter Steinberger informed me that you can also drag the knob for sort of a &#8220;slow switching&#8221;, something I had not thought about initially. But so I spent a couple of hours honing the animation behavior to get as close to the original as possible. Now DTCustomSwitch even does that. DTCustomSwitch will available via the Dr. Touch&#8217;s Parts Store for 50 Euros.]]></description>
				<content:encoded><![CDATA[<p>I wanted to use a UISwitch in iWoman to select between Celsius and Fahrenheit for the temperature scale. UISwitch being in my humble opinion the quickest method to switch between two values. Unfortunately Apple does not give us any kind of customization capability.</p>
<p>Homick tried to fill this need by making a custom view and providing a photoshop file that you could change. But that&#8217;s not how we do things in Dr. Touchistan. I totally revamped <a href="http://github.com/homick/iPhone-Snippets/tree/master/General">Homick&#8217;s code</a> and brought it up to snuff to what I needed. Most importantly the color and labels needed to be fully customizable IN CODE.</p>
<p>DTCustomSwitch is almost entirely written from ground up as a UIControl where you can customize the text and looks of of both labels as you please. Even set the background color. That so far fulfills my needs for iWoman 2.0, but if you have any ideas on how to even more customize it, let me know.</p>
<p><a href="http://petersteinberger.com/">Peter Steinberger</a> informed me that you can also drag the knob for sort of a &#8220;slow switching&#8221;, something I had not thought about initially. But so I spent a couple of hours honing the animation behavior to get as close to the original as possible. Now DTCustomSwitch even does that.</p>
<p>DTCustomSwitch will available via the Dr. Touch&#8217;s Parts Store for 50 Euros.</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=2631&amp;md5=773cf6864512533f813cea9a8f9fc45f" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2010/06/dtcustomswitch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2010%2F06%2Fdtcustomswitch%2F&amp;language=en_GB&amp;category=text&amp;title=DTCustomSwitch&amp;description=I+wanted+to+use+a+UISwitch+in+iWoman+to+select+between+Celsius+and+Fahrenheit+for+the+temperature+scale.+UISwitch+being+in+my+humble+opinion+the+quickest+method+to+switch+between...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>DTVideoEncoder</title>
		<link>http://www.cocoanetics.com/2010/04/dtvideoencoder/</link>
		<comments>http://www.cocoanetics.com/2010/04/dtvideoencoder/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 08:07:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Parts]]></category>
		<category><![CDATA[DTVideoEncoder]]></category>

		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=2421</guid>
		<description><![CDATA[I&#8217;ve been approached by several parties asking for a component to capture live video. I did my homework but had to find that without access to a hardware-based video encoder it is not possible to get real time frame rates on iPhones. Interviewing the maker of the ShowTime Video Recorder app for iPhone 2G and 3G enlightened me a bit as to what tricks they used to pull off their app. They use AVI containers for JPEG frames and PCM audio. Other people seem to have a bit of success with compiling FFMPEG on the iPhone. But generally MPEG4 does not use less CPU power than encoding JPEGs, it uses MORE, causing even worse frame rates for live video. And that&#8217;s ignoring the licensing problems you get when selling an app that has a h.264 encoder. A double-whammy in non-feasability for FFMPEG, all the more reason to find out the truth of the matter. So we set out to build DTVideoEncoder to see for ourselves what kind of performance we can get. Unfortunately it turns out that even on a 3GS we are getting a maximum frame rate of 5 frames per second when encoding live screenshots. Polar Bear Farm hinted that they are only able to get their performance (of around 6 fps) because of heavy assembly-optimizing the JPEG compression library . But they communicated a disinterest in licensing it for us to put into a sellable component. So we were stuck. Until actually somebody told us that instead of live video encoding he just wanted to add JPEG files to an AVI container plus audio. Because the JPEG files where already compressed  he would not face the bottleneck of JPEG compression. Suddenly this specific use case reinvigorated the project. Kris Harris &#8211; maker of the 8 Track Mind iPhone game &#8211; went back into the depths of the AVI documentation and polished up DTVideoEncoder to be usable for offline encoding and added the requested capability of adding an existing PCM audio file as soundtrack. Kris is a great developer and his code is awesome, I&#8217;m glad to have him on my Dr. Touch Core Team. Here&#8217;s a demonstration of the Demo app that you get with the component. DTVideoEncoder does not have any external dependencies. Because the external JPEG compression library did not yield any performance improvement over what&#8217;s built into the SDK we chose to go with the on-board method. Hours and hours worth of research and coding went into in this simple to use component to warrant a price tag of several hundred dollars. But because of the limited utility we we set the price to the lower end of the spectrum, at 250 Euros. It might enable one or more interesting uses of offline-video on iPhone or iPad.]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been approached by several parties asking for a component to capture live video. I did my homework but had to find that without access to a hardware-based video encoder it is not possible to get real time frame rates on iPhones.</p>
<p>Interviewing the maker of the <a href="http://itunes.apple.com/us/app/showtime-video-recorder-for/id347868780?mt=8">ShowTime Video Recorder</a> app for iPhone 2G and 3G enlightened me a bit as to what tricks they used to pull off their app. They use AVI containers for JPEG frames and PCM audio. Other people seem to have a bit of success with compiling FFMPEG on the iPhone. But generally MPEG4 does not use less CPU power than encoding JPEGs, it uses MORE, causing even worse frame rates for live video.</p>
<p>And that&#8217;s ignoring the licensing problems you get when selling an app that has a h.264 encoder. A double-whammy in non-feasability for FFMPEG, all the more reason to find out the truth of the matter.</p>
<p>So we set out to build DTVideoEncoder to see for ourselves what kind of performance we can get. Unfortunately it turns out that even on a 3GS we are getting a maximum frame rate of 5 frames per second when encoding live screenshots. <a href="http://www.polarbearfarm.com/showtime/">Polar Bear Farm</a> hinted that they are only able to get their performance (of around 6 fps) because of heavy assembly-optimizing the JPEG compression library . But they communicated a disinterest in licensing it for us to put into a sellable component.</p>
<p>So we were stuck. Until actually somebody told us that instead of live video encoding he just wanted to add JPEG files to an AVI container plus audio. Because the JPEG files where already compressed  he would not face the bottleneck of JPEG compression. Suddenly this specific use case reinvigorated the project.</p>
<p>Kris Harris &#8211; <a href="http://improbablesciences.com/products/8-track-mind/">maker of the 8 Track Mind iPhone game</a> &#8211; went back into the depths of the AVI documentation and polished up DTVideoEncoder to be usable for offline encoding and added the requested capability of adding an existing PCM audio file as soundtrack. Kris is a great developer and his code is awesome, I&#8217;m glad to have him on my Dr. Touch Core Team.</p>
<p>Here&#8217;s a demonstration of the Demo app that you get with the component.</p>
<p>DTVideoEncoder does not have any external dependencies. Because the external JPEG compression library did not yield any performance improvement over what&#8217;s built into the SDK we chose to go with the on-board method.</p>
<p>Hours and hours worth of research and coding went into in this simple to use component to warrant a price tag of several hundred dollars. But because of the limited utility we we set the price to the lower end of the spectrum, at 250 Euros. It might enable one or more interesting uses of offline-video on iPhone or iPad.</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=2421&amp;md5=e1286366bd47534a263b7f4c65c862a5" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2010/04/dtvideoencoder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.drobnik.com/audio/DTVideoEncoder_Test.avi" length="738240" type="video/x-msvideo" />
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2010%2F04%2Fdtvideoencoder%2F&amp;language=en_GB&amp;category=text&amp;title=DTVideoEncoder&amp;description=I%26%238217%3Bve+been+approached+by+several+parties+asking+for+a+component+to+capture+live+video.+I+did+my+homework+but+had+to+find+that+without+access+to+a+hardware-based+video+encoder...&amp;tags=DTVideoEncoder%2Cblog" type="text/html" />
	</item>
		<item>
		<title>DTLEDNumberView</title>
		<link>http://www.cocoanetics.com/2010/02/dtlednumberview/</link>
		<comments>http://www.cocoanetics.com/2010/02/dtlednumberview/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 09:51:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=2037</guid>
		<description><![CDATA[When experimenting with the iPhone&#8217;s built-in LED font I found it severely lacking in terms of usability. It&#8217;s designer has had the glorious  idea of not making all numbers the same size. This means that if you have any kind of changing label (like for example a digital clock) then the contents of the label will jump around as digits change size. This is especially annoying going from or to a one which is extra slim. Generally my instinct is to use regular smooth fonts for display of numbers, but I find that every 2 or 3 months I get into a situation where the classic LED look would be the perfect gimmick. For example I am still pondering how to make the UI of GeoCorder more attractive and one idea was to have the measurements be displayed in LED numbers. So I set out to create a reusable solution for this problem. A quick search on Google gave me this image from iStockphoto. It does have their watermark, but I was not going to simply off their images. Instead I used it as a template to construct a resolution-indendent drawRect for my DTLEDDigitView. The resolution was just big enough so that I could find the edges in my image editor and make the appropriate connections. Basically you cut out the 8 which has the best contrast on all sides and then you get the coordinates of each corner of each bar. To make it resolution-indendent you then multiply each value with a unit size for width and height so that this scales nicely. The main reason why I wanted it to be resolution-independent is that this will look nice very small but also on the many extra pixels that are available on the iPad. So if you use DTLEDNumberView you don&#8217;t have to worry about static LED number images being scaled into fuzzyness. My solution is always crisp. Then I added code to turn on and off single bars depending on the digit property. Also I wanted to be able to control the dot, so I added a property for that. Activated bars are paths filled with this distinct red, non-activated bars are 100% white with 30% alpha so they will lighten any background slightly. That&#8217;s all about the drawing. Very useful when creating custom views like this is to fill in the sizeThatFits method with some algorithm that will adjust the width and/or height accordingly. In this case I am using it to find a scaling where the aspect ration of the numbers still fits in. Then I took the DTLEDDigitView and made a view to add to itself as many such digits as a property numberOfDigits would decide. Optionally there is a property numberOfDecimalPlaces which decides how far from the right the comma is. The final touch is to have a value property and to adjust all the individual digits accordingly if it changes. Here&#8217;s my demonstration video, it simply adds PI every tenth of a second so that you see the numbers change, also behind the comma. I can immediately think of a number of useful customizations, like changing the colors for active and inactive and maybe adding a neon glow to the active bars. But for lack of a concrete application with it&#8217;s requirements I won&#8217;t fiddle around with it until there is one. I need either myself or somebody else to have an app to add this component to so that I know the final tidbits necessary. The whole thing took me about a day to make so I&#8217;ll set the introductory price at 50 Euros. If you&#8217;d like to use this technique in your own apps, drop me an e-mail so we can discuss what extra features you would require to make the purchase.]]></description>
				<content:encoded><![CDATA[<p>When experimenting with the iPhone&#8217;s built-in <a href="http://www.cocoanetics.com/2010/02/understanding-uifont/">LED font</a> I found it severely lacking in terms of usability. It&#8217;s designer has had the glorious  idea of not making all numbers the same size. This means that if you have any kind of changing label (like for example a digital clock) then the contents of the label will jump around as digits change size. This is especially annoying going from or to a one which is extra slim.</p>
<p>Generally my instinct is to use regular smooth fonts for display of numbers, but I find that every 2 or 3 months I get into a situation where the classic LED look would be the perfect gimmick. For example I am still pondering how to make the UI of GeoCorder more attractive and one idea was to have the measurements be displayed in LED numbers.</p>
<p>So I set out to create a reusable solution for this problem. A quick search on Google gave me this image from iStockphoto. It does have their watermark, but I was not going to simply off their images. Instead I used it as a template to construct a resolution-indendent drawRect for my DTLEDDigitView. The resolution was just big enough so that I could find the edges in my image editor and make the appropriate connections.</p>
<p><a href="http://i2.wp.com/www.cocoanetics.com/files/ist2_6160855-led-numbers.jpg"><img class="alignnone size-full wp-image-2038" src="http://i2.wp.com/www.cocoanetics.com/files/ist2_6160855-led-numbers.jpg?resize=228%2C134" alt="" data-recalc-dims="1" /></a></p>
<p><img class="alignright size-full wp-image-2040" style="margin-left: 10px;margin-bottom: 10px" src="http://i0.wp.com/www.cocoanetics.com/files/Screen-shot-2010-02-13-at-10.45.25.png?resize=187%2C285" alt="" data-recalc-dims="1" /></p>
<p>Basically you cut out the 8 which has the best contrast on all sides and then you get the coordinates of each corner of each bar. To make it resolution-indendent you then multiply each value with a unit size for width and height so that this scales nicely. The main reason why I wanted it to be resolution-independent is that this will look nice very small but also on the many extra pixels that are available on the iPad. So if you use DTLEDNumberView you don&#8217;t have to worry about static LED number images being scaled into fuzzyness. My solution is always crisp.</p>
<p>Then I added code to turn on and off single bars depending on the digit property. Also I wanted to be able to control the dot, so I added a property for that. Activated bars are paths filled with this distinct red, non-activated bars are 100% white with 30% alpha so they will lighten any background slightly. That&#8217;s all about the drawing.</p>
<p>Very useful when creating custom views like this is to fill in the sizeThatFits method with some algorithm that will adjust the width and/or height accordingly. In this case I am using it to find a scaling where the aspect ration of the numbers still fits in.</p>
<p>Then I took the DTLEDDigitView and made a view to add to itself as many such digits as a property numberOfDigits would decide. Optionally there is a property numberOfDecimalPlaces which decides how far from the right the comma is. The final touch is to have a value property and to adjust all the individual digits accordingly if it changes.</p>
<p>Here&#8217;s my demonstration video, it simply adds PI every tenth of a second so that you see the numbers change, also behind the comma.</p>
<p>I can immediately think of a number of useful customizations, like changing the colors for active and inactive and maybe adding a <a href="http://www.cocoanetics.com/2010/01/uilabels-with-neon-effect/">neon glow</a> to the active bars. But for lack of a concrete application with it&#8217;s requirements I won&#8217;t fiddle around with it until there is one. I need either myself or somebody else to have an app to add this component to so that I know the final tidbits necessary.</p>
<p>The whole thing took me about a day to make so I&#8217;ll set the introductory price at 50 Euros. If you&#8217;d like to use this technique in your own apps, <a href="mailto:oliver@drobnik.com?subject=DTLEDNumberView">drop me an e-mail</a> so we can discuss what extra features you would require to make the purchase.</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=2037&amp;md5=cd499265aab64d6e77b78098677d86ef" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2010/02/dtlednumberview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2010%2F02%2Fdtlednumberview%2F&amp;language=en_GB&amp;category=text&amp;title=DTLEDNumberView&amp;description=When+experimenting+with+the+iPhone%26%238217%3Bs+built-in+LED+font+I+found+it+severely+lacking+in+terms+of+usability.+It%26%238217%3Bs+designer+has+had+the+glorious%C2%A0%C2%A0idea+of+not+making+all+numbers+the+same...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>DTSplashExtender</title>
		<link>http://www.cocoanetics.com/2010/02/dtsplashextender/</link>
		<comments>http://www.cocoanetics.com/2010/02/dtsplashextender/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 09:08:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1985</guid>
		<description><![CDATA[Typically you would use Default.png to show an empty user interface to reuse the subjective loading time of apps. This is especially true for productivity apps. Games are an example of the opposite. There you often see several splash screens with logos and copyright information. Between those extremes there are apps that use licensed materials and where it makes sense to briefly show such licensing information right at the start. The loading screen however is only showing for as long as the app needs to start up, which can be extremely short if the app is well coded and/or running on an iPhone 3GS. So out of the need to display the loading screen&#8221;a bit longer&#8221; resulted revelopment of DTSplashExtender. This new addition to my Dr. Touch Parts Store gives you this exact capability in a worry-free package. With this method you set a timeout of several seconds for which the Default.png is shown extra. You can have subsequent images that are faded to after the time has elapsed and show multiple pages with logos this way. When the show is over you dismiss the modal DTSplashExtender controller, your choice of flip, cross-dissolve or slide down. There are delegate methods that you can hook into in your app delegate to perform certain actions when a certain page is showing. Additionally you can enable a feature where tapping the screen ends the show or fades to the next page right away. For example you could show a button to prompt the user to accept your licensing terms. Let me know if you have special requirements. Here&#8217;s a quick demo:]]></description>
				<content:encoded><![CDATA[<p>Typically you would use Default.png to show an empty user interface to reuse the subjective loading time of apps. This is especially true for productivity apps. Games are an example of the opposite. There you often see several splash screens with logos and copyright information. Between those extremes there are apps that use licensed materials and where it makes sense to briefly show such licensing information right at the start. The loading screen however is only showing for as long as the app needs to start up, which can be extremely short if the app is well coded and/or running on an iPhone 3GS.</p>
<p>So out of the need to display the loading screen&#8221;a bit longer&#8221; resulted revelopment of DTSplashExtender.</p>
<p>This new addition to my <a href="http://www.cocoanetics.com/parts-store/">Dr. Touch Parts Store</a> gives you this exact capability in a worry-free package. With this method you set a timeout of several seconds for which the Default.png is shown extra. You can have subsequent images that are faded to after the time has elapsed and show multiple pages with logos this way. When the show is over you dismiss the modal DTSplashExtender controller, your choice of flip, cross-dissolve or slide down.</p>
<p>There are delegate methods that you can hook into in your app delegate to perform certain actions when a certain page is showing. Additionally you can enable a feature where tapping the screen ends the show or fades to the next page right away. For example you could show a button to prompt the user to accept your licensing terms. Let me know if you have special requirements.</p>
<p>Here&#8217;s a quick demo:</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=1985&amp;md5=d240ddea51e08c74e212c37046d68405" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2010/02/dtsplashextender/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2010%2F02%2Fdtsplashextender%2F&amp;language=en_GB&amp;category=text&amp;title=DTSplashExtender&amp;description=Typically+you+would+use+Default.png+to+show+an+empty+user+interface+to+reuse+the+subjective+loading+time+of+apps.+This+is+especially+true+for+productivity+apps.+Games+are+an+example...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>DTCalendarViewController 2.0</title>
		<link>http://www.cocoanetics.com/2010/02/dtcalendarviewcontroller-2-0/</link>
		<comments>http://www.cocoanetics.com/2010/02/dtcalendarviewcontroller-2-0/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 13:53:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1981</guid>
		<description><![CDATA[When I saw the demo video of Billings Touch it hit me like a cold snowball: it also makes sense to use a calendar to select a date. Billings Touch shows you a nice big calendar view when you select a project due date. Shortly thereafter there was a discussion on date pickers on my favorite forum and the result of this also pointed towards the necessity of having a real calendar replace UIDatePicker. So I sat down for 2 days straight to surgically remove the calendar-related parts from DTCalendarViewController and put those into their own class DTCalendarView. This enables you to use the view by itself. Also I put my secret sauce UIView+sliding into the project, as a free bonus. This category extension allows you to slide in any kind of UIView from the bottom of the screen. Together with DTCalendarView you get magic: a drop in UIDatePicker replacement! Additionally to the above new features there where a couple of minor bug fixes and programmability improvements that will make your life as developer much easier. The update for DTCalendarViewController is free of charge for existing customers. To order your access and license go to the Dr. Touch&#8217;s Parts Store today!]]></description>
				<content:encoded><![CDATA[<p>When I saw the demo video of <a href="http://www.billingsapp.com/iphone/">Billings Touch</a> it hit me like a cold snowball: it also makes sense to use a calendar to select a date. Billings Touch shows you a nice big calendar view when you select a project due date. Shortly thereafter there was a discussion on date pickers on my favorite forum and the result of this also pointed towards the necessity of having a real calendar replace UIDatePicker.</p>
<p>So I sat down for 2 days straight to surgically remove the calendar-related parts from DTCalendarViewController and put those into their own class DTCalendarView. This enables you to use the view by itself. Also I put my secret sauce UIView+sliding into the project, as a free bonus. This category extension allows you to slide in any kind of UIView from the bottom of the screen. Together with DTCalendarView you get magic: a drop in UIDatePicker replacement!</p>
<p>Additionally to the above new features there where a couple of minor bug fixes and programmability improvements that will make your life as developer much easier. The update for DTCalendarViewController is free of charge for existing customers. To order your access and license go to the <a href="http://www.cocoanetics.com/parts-store/">Dr. Touch&#8217;s Parts Store</a> today!</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=1981&amp;md5=36d44d73ac99ad5d29d92833819f6323" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2010/02/dtcalendarviewcontroller-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2010%2F02%2Fdtcalendarviewcontroller-2-0%2F&amp;language=en_GB&amp;category=text&amp;title=DTCalendarViewController+2.0&amp;description=When+I+saw+the+demo+video+of+Billings+Touch+it+hit+me+like+a+cold+snowball%3A+it+also+makes+sense+to+use+a+calendar+to+select+a+date.+Billings+Touch...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Dr. Touch&#039;s Purchase Button</title>
		<link>http://www.cocoanetics.com/2010/02/dr-touchs-purchase-button/</link>
		<comments>http://www.cocoanetics.com/2010/02/dr-touchs-purchase-button/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 18:21:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Parts]]></category>

		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1966</guid>
		<description><![CDATA[When you get around to adding In App Purchases (IAP) to your app you will find that Apple does not provide anything to help you with the UI. StoreKit only takes care of the buying backend. Therefore I sat down and spent many hours to construct a customizable purchase button to be the latest addition to the Dr. Touch Parts Store. DTPurchaseButton This is a button that has three states you need for In App Purchases: Neutral, Confirm and Purchased. For each of these states you can set a text and a title and the button does all the rest. It will send a message to your delegate when the button resizes so that you can move UI elements out of the way. It informs your app if a purchase should be made via StoreKit or whether it was cancelled. DTPurchase Button transmits an especially high value of your IAPs by  using a custom gloss finish. Have a look at this video demonstration of the part in action: Price: 100 EUR You can order this part for use in your own projects via e-mail. See the terms and conditions at the bottom of my store page for the fine print.]]></description>
				<content:encoded><![CDATA[<p>When you get around to adding In App Purchases (IAP) to your app you will find that Apple does not provide anything to help you with the UI. StoreKit only takes care of the buying backend. Therefore I sat down and spent many hours to construct a customizable purchase button to be the latest addition to the <a href="http://www.cocoanetics.com/parts-store/">Dr. Touch Parts Store</a>.</p>
<h3>DTPurchaseButton</h3>
<p>This is a button that has three states you need for In App Purchases: Neutral, Confirm and Purchased. For each of these states you can set a text and a title and the button does all the rest. It will send a message to your delegate when the button resizes so that you can move UI elements out of the way. It informs your app if a purchase should be made via StoreKit or whether it was cancelled. DTPurchase Button transmits an especially high value of your IAPs by  using a custom gloss finish.</p>
<p><a href="http://i1.wp.com/www.cocoanetics.com/files/States.png"><img class="alignnone size-full wp-image-1967" src="http://i1.wp.com/www.cocoanetics.com/files/States.png?resize=267%2C34" alt="" data-recalc-dims="1" /></a></p>
<p>Have a look at this video demonstration of the part in action:</p>
<p>Price: 100 EUR</p>
<p>You can order this part for use in your own projects <a href="mailto:oliver@drobnik.com?subject=DTPurchaseButton">via e-mail</a>. See the terms and conditions at the bottom of my <a href="http://www.cocoanetics.com/parts-store/">store page</a> for the fine print.</p>
 <p><a href="http://www.cocoanetics.com/?flattrss_redirect&amp;id=1966&amp;md5=3a31e43ee4e231b896e95d8a48456d24" title="Flattr" target="_blank"><img src="http://www.cocoanetics.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.cocoanetics.com/2010/02/dr-touchs-purchase-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=dr_touch&amp;url=http%3A%2F%2Fwww.cocoanetics.com%2F2010%2F02%2Fdr-touchs-purchase-button%2F&amp;language=en_GB&amp;category=text&amp;title=Dr.+Touch%26%23039%3Bs+Purchase+Button&amp;description=When+you+get+around+to+adding+In+App+Purchases+%28IAP%29+to+your+app+you+will+find+that+Apple+does+not+provide+anything+to+help+you+with+the+UI.+StoreKit+only...&amp;tags=blog" type="text/html" />
	</item>
	</channel>
</rss>
