<?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>MacFan</title>
	<atom:link href="http://www.jkraft.fr/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jkraft.fr</link>
	<description>Tout sur le web et le développement</description>
	<lastBuildDate>Fri, 25 May 2012 08:43:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Forum PHP 2012</title>
		<link>http://www.jkraft.fr/2012/05/25/forum-php-2012/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=forum-php-2012</link>
		<comments>http://www.jkraft.fr/2012/05/25/forum-php-2012/#comments</comments>
		<pubDate>Fri, 25 May 2012 08:42:13 +0000</pubDate>
		<dc:creator>kraft</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://www.jkraft.fr/?p=816</guid>
		<description><![CDATA[Le forum PHP 2012 se tiendra à Paris le 5 et 6 juin. Un programme très alléchant: LAMP, PostgreSQL, test, haute dispo, projet etc.. http://www.afup.org/pages/forumphp2012/]]></description>
			<content:encoded><![CDATA[<p>Le forum PHP 2012 se tiendra à Paris le 5 et 6 juin.<br />
Un programme très alléchant: LAMP, PostgreSQL, test, haute dispo, projet etc..</p>
<p><a href="http://www.afup.org/pages/forumphp2012/" target="_blank">http://www.afup.org/pages/forumphp2012/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkraft.fr/2012/05/25/forum-php-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cocoa Literature List</title>
		<link>http://www.jkraft.fr/2012/04/16/cocoa-literature-list/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cocoa-literature-list</link>
		<comments>http://www.jkraft.fr/2012/04/16/cocoa-literature-list/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 08:57:25 +0000</pubDate>
		<dc:creator>kraft</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[livre]]></category>

		<guid isPermaLink="false">http://www.jkraft.fr/?p=813</guid>
		<description><![CDATA[Voilà une excellente idée. Regrouper énormément de doc sur Cocoa. http://cocoalit.com/]]></description>
			<content:encoded><![CDATA[<p>Voilà une excellente idée. Regrouper énormément de doc sur Cocoa.</p>
<p><a href="http://cocoalit.com/" target="_blank">http://cocoalit.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkraft.fr/2012/04/16/cocoa-literature-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Framework JS : Meteor</title>
		<link>http://www.jkraft.fr/2012/04/12/framework-js-meteor/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=framework-js-meteor</link>
		<comments>http://www.jkraft.fr/2012/04/12/framework-js-meteor/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 13:06:25 +0000</pubDate>
		<dc:creator>kraft</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[NoSQL]]></category>

		<guid isPermaLink="false">http://www.jkraft.fr/?p=810</guid>
		<description><![CDATA[Je viens de découvrir ce framework en JS. Basé sur NodeJS et MongoDB (une base de données NoSQL) il permet de faire des choses très intéressantes en live. La démo est vraiment pas mal. A découvrir et essayer ici : http://www.meteor.com/main]]></description>
			<content:encoded><![CDATA[<p>Je viens de découvrir ce framework en JS. Basé sur NodeJS et MongoDB (une base de données NoSQL) il permet de faire des choses très intéressantes en live.<br />
La démo est vraiment pas mal.<br />
A découvrir et essayer ici :</p>
<p><a href="http://www.meteor.com/main" target="_blank">http://www.meteor.com/main</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkraft.fr/2012/04/12/framework-js-meteor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java et Application Loader</title>
		<link>http://www.jkraft.fr/2012/04/06/java-et-application-loader/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=java-et-application-loader</link>
		<comments>http://www.jkraft.fr/2012/04/06/java-et-application-loader/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 12:08:36 +0000</pubDate>
		<dc:creator>kraft</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[Iphone]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[application loader]]></category>
		<category><![CDATA[appstore]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://www.jkraft.fr/?p=804</guid>
		<description><![CDATA[Suite aux dernières mises à jour de Java proposées par Apple, il semblerait que Application Loader soit cassé. Donc impossible de soumettre des applications sur l&#8217;app store. Mais une solution a été trouvée. sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5 sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0]]></description>
			<content:encoded><![CDATA[<p>Suite aux dernières mises à jour de Java proposées par Apple, il semblerait que Application Loader soit cassé. Donc impossible de soumettre des applications sur l&#8217;app store.</p>
<p>Mais une solution a été trouvée.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">sudo ln <span style="color: #002200;">-</span>s CurrentJDK <span style="color: #002200;">/</span>System<span style="color: #002200;">/</span>Library<span style="color: #002200;">/</span>Frameworks<span style="color: #002200;">/</span>JavaVM.framework<span style="color: #002200;">/</span>Versions<span style="color: #002200;">/</span><span style="color: #2400d9;">1.5</span>
sudo ln <span style="color: #002200;">-</span>s CurrentJDK <span style="color: #002200;">/</span>System<span style="color: #002200;">/</span>Library<span style="color: #002200;">/</span>Frameworks<span style="color: #002200;">/</span>JavaVM.framework<span style="color: #002200;">/</span>Versions<span style="color: #002200;">/</span>1.5.0</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jkraft.fr/2012/04/06/java-et-application-loader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Core-Plot passe la première !</title>
		<link>http://www.jkraft.fr/2012/03/28/core-plot-passe-la-premiere/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=core-plot-passe-la-premiere</link>
		<comments>http://www.jkraft.fr/2012/03/28/core-plot-passe-la-premiere/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 10:26:59 +0000</pubDate>
		<dc:creator>kraft</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[core-plot]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[graphique]]></category>
		<category><![CDATA[Iphone]]></category>

		<guid isPermaLink="false">http://www.jkraft.fr/?p=800</guid>
		<description><![CDATA[Core-Plot vient de passer en 1.0. Il supporte enfin ARC! Vous pouvez le retrouver ici : http://code.google.com/p/core-plot/ Mes tutos sur ce sujet : http://www.jkraft.fr/2012/01/15/objective-c-tutorial-core-plot-suite/ http://www.jkraft.fr/2012/01/14/objective-c-core-plot-tutorial/]]></description>
			<content:encoded><![CDATA[<p>Core-Plot vient de passer en 1.0.<br />
Il supporte enfin ARC!</p>
<p>Vous pouvez le retrouver ici : <a href="http://code.google.com/p/core-plot/" target="_blank">http://code.google.com/p/core-plot/</a></p>
<p>Mes tutos sur ce sujet :<br />
<a href="http://www.jkraft.fr/2012/01/15/objective-c-tutorial-core-plot-suite/" target="_blank">http://www.jkraft.fr/2012/01/15/objective-c-tutorial-core-plot-suite/</a><br />
<a href="http://www.jkraft.fr/2012/01/14/objective-c-core-plot-tutorial/" target="_blank">http://www.jkraft.fr/2012/01/14/objective-c-core-plot-tutorial/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkraft.fr/2012/03/28/core-plot-passe-la-premiere/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EasyLogBook</title>
		<link>http://www.jkraft.fr/2012/01/16/easylogbook/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=easylogbook</link>
		<comments>http://www.jkraft.fr/2012/01/16/easylogbook/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 09:03:03 +0000</pubDate>
		<dc:creator>kraft</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Iphone]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[easylogbook]]></category>
		<category><![CDATA[itunes]]></category>

		<guid isPermaLink="false">http://www.jkraft.fr/?p=792</guid>
		<description><![CDATA[Voilà ma dernière application! Un carnet de vol électronique pour les pilotes. Vous renseignez vos différents vols et vous pouvez suivre l&#8217;évolution de vos heures de vol. C&#8217;est très simple et facile à utiliser, bientôt de nouvelles fonctionnalités! http://itunes.apple.com/fr/app/easylogbook/id492497114?l=fr&#038;ls=1&#038;mt=8]]></description>
			<content:encoded><![CDATA[<p>Voilà ma dernière application! Un carnet de vol électronique pour les pilotes.<br />
Vous renseignez vos différents vols et vous pouvez suivre l&#8217;évolution de vos heures de vol.<br />
C&#8217;est très simple et facile à utiliser, bientôt de nouvelles fonctionnalités!</p>
<p><a href="http://itunes.apple.com/fr/app/easylogbook/id492497114?l=fr&#038;ls=1&#038;mt=8" title="easylogbook" target="_blank">http://itunes.apple.com/fr/app/easylogbook/id492497114?l=fr&#038;ls=1&#038;mt=8</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkraft.fr/2012/01/16/easylogbook/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[Objective-c] Tutorial Core-plot suite</title>
		<link>http://www.jkraft.fr/2012/01/15/objective-c-tutorial-core-plot-suite/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=objective-c-tutorial-core-plot-suite</link>
		<comments>http://www.jkraft.fr/2012/01/15/objective-c-tutorial-core-plot-suite/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 22:32:08 +0000</pubDate>
		<dc:creator>kraft</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[Iphone]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[core-plot]]></category>
		<category><![CDATA[graphique]]></category>

		<guid isPermaLink="false">http://www.jkraft.fr/?p=782</guid>
		<description><![CDATA[Dans le tuto précédent on a vu l installation du framework. On va donc maintenant créer un petit graphique très simple. J&#8217;ai créer un projet de type &#171;&#160;Single View Application&#160;&#187;. On va rajouter ce code dans le ViewController.h. #import &#60;UIKit/UIKit.h&#62; #import &#34;CorePlot-CocoaTouch.h&#34; &#160; @interface ViewController : UIViewController &#60;CPTPlotDataSource&#62; &#123; NSMutableArray *dataForPlot; CPTXYGraph *graph; &#125; @property&#40;readwrite, [...]]]></description>
			<content:encoded><![CDATA[<p>Dans le tuto précédent on a vu l installation du framework. On va donc maintenant créer un petit graphique très simple.</p>
<p><span id="more-782"></span></p>
<p>J&#8217;ai créer un projet de type &laquo;&nbsp;Single View Application&nbsp;&raquo;.<br />
On va rajouter ce code dans le ViewController.h.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &lt;UIKit/UIKit.h&gt;</span>
<span style="color: #6e371a;">#import &quot;CorePlot-CocoaTouch.h&quot;</span>
&nbsp;
<span style="color: #a61390;">@interface</span> ViewController <span style="color: #002200;">:</span> UIViewController  &lt;CPTPlotDataSource&gt;  <span style="color: #002200;">&#123;</span>
   <span style="color: #400080;">NSMutableArray</span> <span style="color: #002200;">*</span>dataForPlot;
   CPTXYGraph <span style="color: #002200;">*</span>graph;
<span style="color: #002200;">&#125;</span>
<span style="color: #a61390;">@property</span><span style="color: #002200;">&#40;</span>readwrite, retain, nonatomic<span style="color: #002200;">&#41;</span> <span style="color: #400080;">NSMutableArray</span> <span style="color: #002200;">*</span>dataForPlot;
&nbsp;
<span style="color: #a61390;">@end</span></pre></div></div>

<p>On a donc un tableau contenant les valeurs du graphique, et l&#8217;objet du graphique de type CPTXYGraph. Il y a d&#8217;autre type comme camembert (pie) etc&#8230;<br />
On a aussi défini la class comme la source de données avec le &laquo;&nbsp;CPTPlotDataSource&nbsp;&raquo;.</p>
<p>Ensuite, dans le ViewController.m.<br />
On ajoute :</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">@synthesize</span> dataForPlot;
&nbsp;
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span>NSUInteger<span style="color: #002200;">&#41;</span>numberOfRecordsForPlot<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>CPTPlot <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>plot <span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>dataForPlot count<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSNumber</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>numberForPlot<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>CPTPlot <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>plot field<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSUInteger<span style="color: #002200;">&#41;</span>fieldEnum recordIndex<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSUInteger<span style="color: #002200;">&#41;</span>index  <span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>dataForPlot objectAtIndex<span style="color: #002200;">:</span>index<span style="color: #002200;">&#93;</span> valueForKey<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>fieldEnum <span style="color: #002200;">==</span> CPTScatterPlotFieldX ? <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;x&quot;</span> <span style="color: #002200;">:</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;y&quot;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>Ces 2 méthodes sont nécessaires un peu comme celles pour un UItableView. On a celle qui retourne le nombre d&#8217;éléments de la source. Et l&#8217;autre retourne chaqu&#8217;une des valeurs.</p>
<p>Ensuite, on rajoute dans viewDidLoad :</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">&nbsp;
 <span style="color: #11740a; font-style: italic;">// Données de test</span>
	<span style="color: #400080;">NSMutableArray</span> <span style="color: #002200;">*</span>contentArray <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSMutableArray</span> arrayWithCapacity<span style="color: #002200;">:</span><span style="color: #2400d9;">30</span><span style="color: #002200;">&#93;</span>;
	NSUInteger i;
	<span style="color: #a61390;">for</span> <span style="color: #002200;">&#40;</span> i <span style="color: #002200;">=</span> <span style="color: #2400d9;">0</span>; i &lt; <span style="color: #2400d9;">30</span>; i<span style="color: #002200;">++</span> <span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
     <span style="color: #a61390;">id</span> x <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSNumber</span> numberWithFloat<span style="color: #002200;">:</span>i<span style="color: #002200;">&#93;</span>;
     <span style="color: #a61390;">id</span> y <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSNumber</span> numberWithFloat<span style="color: #002200;">:</span><span style="color: #2400d9;">1.2</span><span style="color: #002200;">*</span><span style="color: #a61390;">rand</span><span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">/</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">float</span><span style="color: #002200;">&#41;</span><span style="color: #a61390;">RAND_MAX</span> <span style="color: #002200;">+</span> <span style="color: #2400d9;">2.2</span><span style="color: #002200;">&#93;</span>;
     <span style="color: #002200;">&#91;</span>contentArray addObject<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSMutableDictionary</span> dictionaryWithObjectsAndKeys<span style="color: #002200;">:</span>x, <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;x&quot;</span>, y, <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;y&quot;</span>, <span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
     <span style="color: #002200;">&#125;</span>
    self.dataForPlot <span style="color: #002200;">=</span> contentArray;
&nbsp;
    graph <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CPTXYGraph alloc<span style="color: #002200;">&#93;</span> initWithFrame<span style="color: #002200;">:</span>CGRectZero<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Theme du graphique</span>
	CPTTheme <span style="color: #002200;">*</span>theme <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>CPTTheme themeNamed<span style="color: #002200;">:</span>kCPTPlainWhiteTheme<span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#91;</span>graph applyTheme<span style="color: #002200;">:</span>theme<span style="color: #002200;">&#93;</span>;
&nbsp;
    UIView <span style="color: #002200;">*</span> hostingView <span style="color: #002200;">=</span> self.view;
&nbsp;
    CPTGraphHostingView <span style="color: #002200;">*</span>graphHostingView <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CPTGraphHostingView alloc<span style="color: #002200;">&#93;</span> initWithFrame<span style="color: #002200;">:</span>CGRectMake<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">300</span>, <span style="color: #2400d9;">450</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;
    graphHostingView.collapsesLayers <span style="color: #002200;">=</span> <span style="color: #a61390;">NO</span>;
    <span style="color: #002200;">&#91;</span>hostingView addSubview<span style="color: #002200;">:</span>graphHostingView<span style="color: #002200;">&#93;</span>;</pre></div></div>

<p>Qui permet de créer la zone du graphique on choisissant ses dimensions et son thème. Ici un <em>kCPTDarkGradientTheme</em>. Ainsi qu&#8217;un petit algo permettant de créer des données de test.</p>
<p>Ensuite on peut affiner l affichage du graphique à partir des axes:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"> CPTXYPlotSpace <span style="color: #002200;">*</span>plotSpace <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>CPTXYPlotSpace <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>graph.defaultPlotSpace;
    plotSpace.allowsUserInteraction <span style="color: #002200;">=</span> <span style="color: #a61390;">YES</span>;
    plotSpace.xRange <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>CPTPlotRange plotRangeWithLocation<span style="color: #002200;">:</span>CPTDecimalFromFloat<span style="color: #002200;">&#40;</span><span style="color: #002200;">-</span><span style="color: #2400d9;">1.8</span><span style="color: #002200;">&#41;</span> length<span style="color: #002200;">:</span>CPTDecimalFromFloat<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">30.0</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>; 
    plotSpace.yRange <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>CPTPlotRange plotRangeWithLocation<span style="color: #002200;">:</span>CPTDecimalFromFloat<span style="color: #002200;">&#40;</span><span style="color: #002200;">-</span><span style="color: #2400d9;">0.8</span><span style="color: #002200;">&#41;</span> length<span style="color: #002200;">:</span>CPTDecimalFromInt<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">10</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">    <span style="color: #11740a; font-style: italic;">// Axe X</span>
    CPTXYAxisSet <span style="color: #002200;">*</span>axisSet <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>CPTXYAxisSet <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>graph.axisSet;
    CPTXYAxis <span style="color: #002200;">*</span>x <span style="color: #002200;">=</span> axisSet.xAxis;
    x.majorIntervalLength <span style="color: #002200;">=</span> CPTDecimalFromString<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;5&quot;</span><span style="color: #002200;">&#41;</span>;
    x.minorTicksPerInterval <span style="color: #002200;">=</span> <span style="color: #2400d9;">4</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Axe Y</span>
    CPTXYAxis <span style="color: #002200;">*</span>y <span style="color: #002200;">=</span> axisSet.yAxis;
    y.majorIntervalLength <span style="color: #002200;">=</span> CPTDecimalFromString<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;5&quot;</span><span style="color: #002200;">&#41;</span>;
    y.minorTicksPerInterval <span style="color: #002200;">=</span> <span style="color: #2400d9;">4</span>;</pre></div></div>

<p>Cela permet de modifier l&#8217;échelle des axes.</p>
<p>Et enfin le plus important:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"> <span style="color: #11740a; font-style: italic;">// Ligne du graphique</span>
    CPTScatterPlot <span style="color: #002200;">*</span>boundLinePlot <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CPTScatterPlot alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;
    CPTMutableLineStyle <span style="color: #002200;">*</span>lineStyle <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>CPTMutableLineStyle lineStyle<span style="color: #002200;">&#93;</span>;
    lineStyle.miterLimit <span style="color: #002200;">=</span> 1.0f;
    lineStyle.lineWidth <span style="color: #002200;">=</span> 4.0f;
    lineStyle.lineColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>CPTColor blueColor<span style="color: #002200;">&#93;</span>;
    boundLinePlot.dataLineStyle <span style="color: #002200;">=</span> lineStyle;
    boundLinePlot.identifier <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Blue Plot&quot;</span>;
    boundLinePlot.dataSource <span style="color: #002200;">=</span> self;
	<span style="color: #002200;">&#91;</span>graph addPlot<span style="color: #002200;">:</span>boundLinePlot<span style="color: #002200;">&#93;</span>;</pre></div></div>

<p>Qui permet de configurer l&#8217;affichage de la ligne du graphique à proprement parlé. Sa couleur, son stye etc.</p>
<p>Et voilà le résultat!</p>
<p><a href="http://www.jkraft.fr/wp-content/uploads/2012/01/Capture-d’écran-2012-01-15-à-23.24.24.png"><img src="http://www.jkraft.fr/wp-content/uploads/2012/01/Capture-d’écran-2012-01-15-à-23.24.24-200x300.png" alt="" title="core-plot" width="200" height="300" class="aligncenter size-medium wp-image-783" /></a></p>
<p>Vous pouvez retrouver les fichiers exemples sur mon <a href="https://github.com/Jekar/jkraft-tuto" target="_blank">github</a>.<br />
Merci à <a href="https://twitter.com/#!/adelrue" target="_blank">Aurélien Delrue</a> pour son aide.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkraft.fr/2012/01/15/objective-c-tutorial-core-plot-suite/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>[Objective-c] Tutorial Core-plot</title>
		<link>http://www.jkraft.fr/2012/01/14/objective-c-core-plot-tutorial/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=objective-c-core-plot-tutorial</link>
		<comments>http://www.jkraft.fr/2012/01/14/objective-c-core-plot-tutorial/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 15:05:40 +0000</pubDate>
		<dc:creator>kraft</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[Iphone]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[core-plot]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[x-code]]></category>

		<guid isPermaLink="false">http://www.jkraft.fr/?p=779</guid>
		<description><![CDATA[Core Plot est un framework permettant de faire toutes sortes de graphiques. Dans ce premier tuto on va juste s&#8217;intéresser à l&#8217;installation dans un projet du framework, par la suite, on verra comment réaliser une simple courbe. Premère chose, télécharger le framework. http://code.google.com/p/core-plot/ Une fois dézippé, créez un nouveau projet du type que vous voulez. [...]]]></description>
			<content:encoded><![CDATA[<p>Core Plot est un framework permettant de faire toutes sortes de graphiques.<br />
Dans ce premier tuto on va juste s&#8217;intéresser à l&#8217;installation dans un projet du framework, par la suite, on verra comment réaliser une simple courbe.</p>
<p><span id="more-779"></span></p>
<p>Premère chose, télécharger le framework.<br />
<a href="http://code.google.com/p/core-plot/" title="Core-plot" target="_blank">http://code.google.com/p/core-plot/</a></p>
<p>Une fois dézippé, créez un nouveau projet du type que vous voulez. Attention à ne pas utiliser ARC, je n&#8217;ai pas trouvé de solution pour le faire cohabiter pour le moment.</p>
<p>On va installer la librairies static, pour cela: </p>
<p>1. Copier le dossier CorePlotHeaders dans votre projet, il se trouve dans Binaires/iOS/ ou MacOS en fonction de votre type d&#8217;application.</p>
<p>2. Copier libCorePlotCocoaTouch.a dans votre projet</p>
<p>3. Dans voter projet, aller dans &laquo;&nbsp;target build settings&nbsp;&raquo; et chercher &laquo;&nbsp;Other Linker Flags&nbsp;&raquo; et rajoutez y :</p>
<p>-ObjC -all_load</p>
<p>4. Ajotuer le framework QuartzCore au projet.</p>
<p>5. Et enfin, dans votre fichier ajoutez : </p>
<p>#import &laquo;&nbsp;CorePlot-CocoaTouch.h&nbsp;&raquo;</p>
<p>Compilez, si vous n&#8217;avez pas d&#8217;erreur, c&#8217;est que tout est prêt.</p>
<p>MAJ: la suite ici : <a href="http://www.jkraft.fr/2012/01/15/objective-c-tutorial-core-plot-suite/">http://www.jkraft.fr/2012/01/15/objective-c-tutorial-core-plot-suite/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkraft.fr/2012/01/14/objective-c-core-plot-tutorial/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iOS Beta Builder</title>
		<link>http://www.jkraft.fr/2011/12/27/ios-beta-builder/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ios-beta-builder</link>
		<comments>http://www.jkraft.fr/2011/12/27/ios-beta-builder/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 14:22:38 +0000</pubDate>
		<dc:creator>kraft</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[Iphone]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[debugage]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://www.jkraft.fr/?p=762</guid>
		<description><![CDATA[Voilà un outil que je n&#8217;ai pas encore testé, mais que je vais m&#8217;empresser de le faire, car il a l&#8217;air très utile. Il permet donc de partager les applications en développement sans passer par itunes. Donc beaucoup plus simple pour tout ce qui est recette et debugage par des personnes tiers. http://www.hanchorllc.com/2010/08/24/introducing-ios-beta-builder/]]></description>
			<content:encoded><![CDATA[<p>Voilà un outil que je n&#8217;ai pas encore testé, mais que je vais m&#8217;empresser de le faire, car il a l&#8217;air très utile.<br />
Il permet donc de partager les applications en développement sans passer par itunes. Donc beaucoup plus simple pour tout ce qui est recette et debugage par des personnes tiers.</p>
<p><a href="http://www.hanchorllc.com/2010/08/24/introducing-ios-beta-builder/" target="_blank">http://www.hanchorllc.com/2010/08/24/introducing-ios-beta-builder/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkraft.fr/2011/12/27/ios-beta-builder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Objective-c] Xcode 4 et storyboard</title>
		<link>http://www.jkraft.fr/2011/12/17/objective-c-xcode4-tutorial-storyboard/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=objective-c-xcode4-tutorial-storyboard</link>
		<comments>http://www.jkraft.fr/2011/12/17/objective-c-xcode4-tutorial-storyboard/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 22:19:40 +0000</pubDate>
		<dc:creator>kraft</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[Iphone]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[storyboard]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://www.jkraft.fr/?p=747</guid>
		<description><![CDATA[Une grosse nouveauté de Xcode 4 est le storyboard. La possibilité de gérer encore plus de chose graphiquement. C&#8217;est un complément d&#8217;interface builder, un moyen de gérer les transitions. Dans ce tutorial on va créer un petit projet qui permet de passer d&#8217;une vue à une autre, en passant en paramètre un petit texte. Nous [...]]]></description>
			<content:encoded><![CDATA[<p>Une grosse nouveauté de Xcode 4 est le storyboard. La possibilité de gérer encore plus de chose graphiquement. C&#8217;est un complément d&#8217;interface builder, un moyen de gérer les transitions.<br />
Dans ce tutorial on va créer un petit projet qui permet de passer d&#8217;une vue à une autre, en passant en paramètre un petit texte.<br />
<span id="more-747"></span></p>
<p>Nous allons donc créer un nouveau projet de type Single View Application. N&#8217;oubliez pas de cocher &laquo;&nbsp;Use Storyboard&nbsp;&raquo; et &laquo;&nbsp;Use Automatic Reference&nbsp;&raquo;.</p>
<p>Puis on va créer une nouvelle vue. Pour cela, aller dans le menu fichier, &laquo;&nbsp;new file&nbsp;&raquo; puis comme classe <em>UIViewController</em>, nommez la SecondViewController. Attention à ne pas créer de fichier Xib.</p>
<p>Dans la liste des fichiers, cliquez sur MainStoryboard, la vous avez votre première vue. Selectionnez la, et dans le menu editor, Embed In, choisissez Navigation Controller. Cela à pour effet de rajouter automatiquement un Navigation controller. On voit apparaitre en haut de la fenêtre la zone du controller.</p>
<p><a href="http://www.jkraft.fr/wp-content/uploads/2011/12/Capture-d’écran-2011-12-17-à-21.15.04.png"><img class="size-medium wp-image-750" title="story1" src="http://www.jkraft.fr/wp-content/uploads/2011/12/Capture-d’écran-2011-12-17-à-21.15.04-300x187.png" alt="" width="300" height="187" /></a></p>
<p>On va y ajouter un bouton, et une zone de saisie (nommez la textSaisie). En appuyant sur contrôle et en tirant vers la page de code, Xcode rajoute automatiquement le code. Magique <img src='http://www.jkraft.fr/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.jkraft.fr/wp-content/uploads/2011/12/Capture-d’écran-2011-12-17-à-22.38.33.png"><img class="aligncenter size-medium wp-image-751" title="story2" src="http://www.jkraft.fr/wp-content/uploads/2011/12/Capture-d’écran-2011-12-17-à-22.38.33-300x122.png" alt="" width="300" height="122" /></a></p>
<p>Maintenant, ajouter un objet View Controller. Configurez la classe avec celle que vous avez crée au début. Ajoutez un <em>UILabel</em> (secondLabel) et un <em>NSString</em> (secondText) qui récupérera le texte. Et de la meme manière, glissez du label vers la page de code. Ajouter à la main le code pour le NSString.</p>
<p>Une fois cette définition créé, faite de même du bouton, glissez vers la nouvelle vue et sélectionner &#8216;Push&#8217;, cela va créer automatiquement le changement de vue.<br />
Vous pouvez ajouter un titre dans la bar du controller.</p>
<p><a href="http://www.jkraft.fr/wp-content/uploads/2011/12/Capture-d’écran-2011-12-17-à-22.41.08.png"><img class="aligncenter size-medium wp-image-752" title="story3" src="http://www.jkraft.fr/wp-content/uploads/2011/12/Capture-d’écran-2011-12-17-à-22.41.08-300x187.png" alt="" width="300" height="187" /></a></p>
<p>Maintenant, il ne reste plus qu&#8217;à mettre en place le mécanisme permettant de récupérer le texte saisie et l&#8217;envoyer dans la 2eme vue. Et c&#8217;est la méthode <em>prepareForSegue</em> qui fait tout le boulot ou presque. N&#8217;oubliez pas d&#8217;importer la classe!!</p>
<p>Dans la première classe ajoutez :</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>prepareForSegue<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIStoryboardSegue <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>segue sender<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span>sender  <span style="color: #002200;">&#123;</span>
        SecondViewController <span style="color: #002200;">*</span>mainView<span style="color: #002200;">=</span> segue.destinationViewController;
        mainView.secondText<span style="color: #002200;">=</span>textSaisie.text;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>Dans la 2eme, dans le viewDidLoad:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">secondLabel.text<span style="color: #002200;">=</span>secondText;</pre></div></div>

<p>Et voilà.<br />
Une petite vidéo récapitulative de cet introduction rapide au Storyboard de Xcode 4. Et le code source sur <a href="https://github.com/Jekar/jkraft-tuto" target="_blank">https://github.com/Jekar/jkraft-tuto</a></p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/NZHYZYOpaUU" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jkraft.fr/2011/12/17/objective-c-xcode4-tutorial-storyboard/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

