<?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>Notes of a Developer &#187; others</title>
	<atom:link href="http://www.developers-life.com/category/i-am-coder/feed" rel="self" type="application/rss+xml" />
	<link>http://www.developers-life.com</link>
	<description>Develop on Objective-C, UIKit, C, OpenGL for  iPhone, iPad, Mac OS X</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:49:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The Terminology of the Basic Trigonometric Functions</title>
		<link>http://www.developers-life.com/the-terminology-of-the-basic-trigonometric-functions.html</link>
		<comments>http://www.developers-life.com/the-terminology-of-the-basic-trigonometric-functions.html#comments</comments>
		<pubDate>Thu, 22 Dec 2011 19:22:16 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[others]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1345</guid>
		<description><![CDATA[Function C function Definition Sine sinf() The ratio of the length of the opposite to the length of the hypotenuse Cosine cosf() The ratio of the length of the adjacent to the length of the hypotenuse Tangent tanf() The ratio of the length of the opposite to the length of the adjacent]]></description>
			<content:encoded><![CDATA[<p><img src="http://lh6.ggpht.com/_QLwms0mVa4w/TMsAQPNKmfI/AAAAAAAAAv8/wnLBiO8XthY/trig_funcs.jpg?imgmax=800" alt="" /></p>
<div  style="styles:clear">
<table border="1" cellspacing="0" cellpadding="4" style="styles:clear;">
<tbody style="styles:clear;">
<tr style="styles:clear;">
<th style="styles:clear;">Function</th>
<th style="styles:clear;">C function</th>
<th style="styles:clear;">Definition</th>
</tr>
<tr style="styles:clear;">
<td style="styles:clear;">Sine</td>
<td style="styles:clear;"><span style="font-family: monospace;styles:clear;">sinf()</span></td>
<td style="styles:clear;">The ratio of the length of the opposite to the length of the hypotenuse</td>
</tr>
<tr  style="styles:clear;">
<td  style="styles:clear;">Cosine</td>
<td><span style="font-family: monospace;styles:clear;">cosf()</span></td>
<td>The ratio of the length of the adjacent to the length of the hypotenuse</td>
</tr>
<tr>
<td>Tangent</td>
<td><span style="font-family: monospace;styles:clear;">tanf()</span></td>
<td>The ratio of the length of the opposite to the length of the adjacent</td>
</tr>
</tbody>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/the-terminology-of-the-basic-trigonometric-functions.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple EKDemo &#8211; EKEvent</title>
		<link>http://www.developers-life.com/simple-ekdemo-ekevent.html</link>
		<comments>http://www.developers-life.com/simple-ekdemo-ekevent.html#comments</comments>
		<pubDate>Sun, 06 Nov 2011 00:28:57 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[others]]></category>
		<category><![CDATA[EKCalendar]]></category>
		<category><![CDATA[EKEvent]]></category>
		<category><![CDATA[EKEventStore]]></category>
		<category><![CDATA[EKEventViewController]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[UIKit]]></category>
		<category><![CDATA[UITableViewController]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1315</guid>
		<description><![CDATA[Now we have controller for creating events. This controller included from 4.0 iOS SDK. SimpleEKDemo The application uses table views to display EKCalendar object and EKEvent objects retrieved from an EKEventStore object. It implements EKEventViewController for viewing and editing existing EKEvents, and uses EKEventEditViewController for creating new EKEvents.]]></description>
			<content:encoded><![CDATA[<p>Now we have controller for creating events. This controller included from 4.0 iOS SDK.</p>
<p><a href="http://www.developers-life.com/wp-content/uploads/2011/11/iOS-Simulator-Screen-shot-Nov-6-2011-2.24.10-AM.png"><img title="iOS Simulator Screen shot Nov 6, 2011 2.24.10 AM" src="http://www.developers-life.com/wp-content/uploads/2011/11/iOS-Simulator-Screen-shot-Nov-6-2011-2.24.10-AM.png" alt="" width="320" height="480" /></a><a href="http://www.developers-life.com/wp-content/uploads/2011/11/iOS-Simulator-Screen-shot-Nov-6-2011-2.21.37-AM.png"><img class="alignnone size-full wp-image-1316" title="iOS Simulator Screen shot Nov 6, 2011 2.21.37 AM" src="http://www.developers-life.com/wp-content/uploads/2011/11/iOS-Simulator-Screen-shot-Nov-6-2011-2.21.37-AM.png" alt="" width="320" height="480" /></a></p>
<p><a href="http://goo.gl/AqdpR">SimpleEKDemo</a></p>
<blockquote><p>The application uses table views to display EKCalendar object and EKEvent objects retrieved from an EKEventStore object. It implements EKEventViewController for viewing and editing existing EKEvents, and uses EKEventEditViewController for creating new EKEvents.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/simple-ekdemo-ekevent.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DDProgressView &#8211; Custom Progress View</title>
		<link>http://www.developers-life.com/ddprogressview-custom-progress-view.html</link>
		<comments>http://www.developers-life.com/ddprogressview-custom-progress-view.html#comments</comments>
		<pubDate>Sat, 05 Nov 2011 15:47:23 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[others]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1310</guid>
		<description><![CDATA[DDProgressView is a custom progress view à la Twitter for iPhone. DDProgressView works on both iOS and Mac OS. You must also compile the AppKitCompatibility.m file when targeting Mac OS. Thanks, Damien DeVille!]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>DDProgressView</strong> is a custom progress view à la Twitter for iPhone.</p>
<p>DDProgressView works on both iOS and Mac OS. You must also compile the AppKitCompatibility.m file when targeting Mac OS.</p>
<p><img class="alignnone" title="DDProgressView" src="https://github.com/ddeville/DDProgressView/raw/master/Screenshot2.png" alt="" width="303" height="154" /></p>
<p><img class="alignnone" src="https://github.com/0xced/DDProgressView/raw/master/Screenshot.png" alt="" width="320" height="65" /></p>
<p><a href="https://github.com/ddeville/DDProgressView"><img class="alignnone size-full wp-image-1257" title="github-logo-80px" src="http://www.developers-life.com/wp-content/uploads/2011/08/github-logo-80px.png" alt="" width="130" height="80" /></a></p></blockquote>
<p>Thanks, <noindex><a href="http://www.ddeville.me/" target="_blank">Damien DeVille</a></noindex>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/ddprogressview-custom-progress-view.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Custom UITextView with syntax highlighting</title>
		<link>http://www.developers-life.com/my-custom-uitextview.html</link>
		<comments>http://www.developers-life.com/my-custom-uitextview.html#comments</comments>
		<pubDate>Sat, 05 Nov 2011 00:51:21 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[others]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[UIFont]]></category>
		<category><![CDATA[UIKit]]></category>
		<category><![CDATA[UITextView]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1306</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://goo.gl/nqOjM"><img class="alignnone size-full wp-image-1307" title="custom UITextView with Highlighting syntax " src="http://www.developers-life.com/wp-content/uploads/2011/11/photo.png" alt="" width="614" height="819" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/my-custom-uitextview.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8220;Geo&#8221; renamed to &#8220;Photo Info Editor&#8221;</title>
		<link>http://www.developers-life.com/geo-photo-info-editor.html</link>
		<comments>http://www.developers-life.com/geo-photo-info-editor.html#comments</comments>
		<pubDate>Sun, 21 Aug 2011 21:17:26 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[others]]></category>
		<category><![CDATA[Geo]]></category>
		<category><![CDATA[Info]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Metadata]]></category>
		<category><![CDATA[Nikkon]]></category>
		<category><![CDATA[Photo]]></category>
		<category><![CDATA[Sparkle]]></category>
		<category><![CDATA[Tag]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1284</guid>
		<description><![CDATA[&#8220;Geo&#8221; renamed to &#8220;Photo Info Editor&#8221; alpha 1.0.1 Added Sparkle updater. Download Photo taken on Nikkon photo cam without GPS. Original date in NSDatePicker of photo.]]></description>
			<content:encoded><![CDATA[<p>&#8220;Geo&#8221; renamed to &#8220;Photo Info Editor&#8221; alpha 1.0.1</p>
<p>Added Sparkle updater.</p>
<p><img class="alignnone" src="http://gyazo.com/4198a9d942d98f09005715c942d6231d.png" alt="" width="409" height="355" /></p>
<p><a href="http://goo.gl/TYJDM" target="_blank"><span style="color: #ff0000;">Download</span></a></p>
<p>Photo taken on Nikkon photo cam without GPS. Original date in NSDatePicker of photo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/geo-photo-info-editor.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nice QR-code generator</title>
		<link>http://www.developers-life.com/nice-qr-code-generator.html</link>
		<comments>http://www.developers-life.com/nice-qr-code-generator.html#comments</comments>
		<pubDate>Mon, 15 Aug 2011 06:24:53 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[others]]></category>
		<category><![CDATA[QR-code]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1265</guid>
		<description><![CDATA[QR-code generator Example: QR-code on my twitter]]></description>
			<content:encoded><![CDATA[<p><noindex><a href="http://android-mobile.ru/qr-code/generator" target="_blank">QR-code generator</a></noindex></p>
<p>Example: QR-code on my twitter<br />
<a href="http://www.developers-life.com/wp-content/uploads/2011/08/1313389123-2.png"><img class="alignnone size-full wp-image-1266" title="code on my twitter" src="http://www.developers-life.com/wp-content/uploads/2011/08/1313389123-2.png" alt="" width="259" height="259" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/nice-qr-code-generator.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problem with highlighting syntax in Xcode 4</title>
		<link>http://www.developers-life.com/problem-with-highlighting-syntax-in-xcode-4.html</link>
		<comments>http://www.developers-life.com/problem-with-highlighting-syntax-in-xcode-4.html#comments</comments>
		<pubDate>Fri, 12 Aug 2011 10:18:36 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[others]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[Xcode 4]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1263</guid>
		<description><![CDATA[1. Close Xcode 2. go to ~/Library/Application Support/Xcode/Color Themes 3. remove your themes 4. Start Xcode 5. Done Very Easy! hahahah UPDATE: Do not add your *.h files to prefix file!]]></description>
			<content:encoded><![CDATA[<p>1. Close Xcode<br />
2. go to ~/Library/Application Support/Xcode/Color Themes<br />
3. remove your themes<br />
4. Start Xcode<br />
5. Done</p>
<p>Very Easy! hahahah</p>
<p><strong>UPDATE: </strong>Do not add your *.h files to<strong> prefix</strong> file!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/problem-with-highlighting-syntax-in-xcode-4.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Custom message Box</title>
		<link>http://www.developers-life.com/custom-message-box.html</link>
		<comments>http://www.developers-life.com/custom-message-box.html#comments</comments>
		<pubDate>Thu, 14 Jul 2011 21:10:40 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[others]]></category>
		<category><![CDATA[NSGraphicsContext]]></category>
		<category><![CDATA[NSView]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1244</guid>
		<description><![CDATA[Custom message box on Cocoa, like iOS messsge bubbles! We need NSView and 5 minutes :) Simple drawing bubble control 1234567891011121314151617181920212223242526272829303132333435363738394041424344&#160; &#160; &#91;NSGraphicsContext saveGraphicsState&#93;; &#160; &#160; &#160; &#160; &#91;&#91;NSColor whiteColor&#93; set&#93;; &#160; &#160; NSRectFill&#40;frameRect&#41;; &#160; &#160; &#160; &#160; /* Draw Shadow */ &#160; &#160; NSShadow *shadow = &#91;&#91;NSShadow alloc&#93; init&#93;; &#160; &#160; &#91;shadow setShadowColor:&#91;&#91;NSColor blackColor&#93; [...]]]></description>
			<content:encoded><![CDATA[<p>Custom message box on Cocoa, like iOS messsge bubbles!</p>
<p><img class="alignnone" title="custom message box objective-c" src="http://gyazo.com/b113756d3e09c1ffe1db8afaf9246c8e.png" alt="" width="458" height="493" /></p>
<p><span id="more-1244"></span></p>
<p>We need NSView and 5 minutes :)<br />
Simple drawing bubble control</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSGraphicsContext_Class/"><span style="color: #400080;">NSGraphicsContext</span></a> saveGraphicsState<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/"><span style="color: #400080;">NSColor</span></a> whiteColor<span style="color: #002200;">&#93;</span> set<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; NSRectFill<span style="color: #002200;">&#40;</span>frameRect<span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">/* Draw Shadow */</span><br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSShadow_Class/"><span style="color: #400080;">NSShadow</span></a> <span style="color: #002200;">*</span>shadow <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSShadow_Class/"><span style="color: #400080;">NSShadow</span></a> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>shadow setShadowColor<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/"><span style="color: #400080;">NSColor</span></a> blackColor<span style="color: #002200;">&#93;</span> colorWithAlphaComponent<span style="color: #002200;">:</span><span style="color: #2400d9;">0.5</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>shadow setShadowOffset<span style="color: #002200;">:</span>NSMakeSize<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">3.0</span>, <span style="color: #002200;">-</span><span style="color: #2400d9;">3.0</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>shadow setShadowBlurRadius<span style="color: #002200;">:</span><span style="color: #2400d9;">2.5</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>shadow set<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">/* Draw Control */</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">NSRect</span> myRect <span style="color: #002200;">=</span> NSMakeRect<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">95</span>, <span style="color: #2400d9;">10</span>, frameRect.size.width <span style="color: #002200;">-</span> <span style="color: #2400d9;">115</span>, frameRect.size.height<span style="color: #002200;">-</span><span style="color: #2400d9;">20</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSBezierPath_Class/"><span style="color: #400080;">NSBezierPath</span></a> <span style="color: #002200;">*</span>path <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSBezierPath_Class/"><span style="color: #400080;">NSBezierPath</span></a> bezierPath<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>path setLineJoinStyle<span style="color: #002200;">:</span>NSRoundLineJoinStyle<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>path appendBezierPathWithRoundedRect<span style="color: #002200;">:</span>myRect xRadius<span style="color: #002200;">:</span><span style="color: #2400d9;">8.0</span> yRadius<span style="color: #002200;">:</span><span style="color: #2400d9;">8.0</span><span style="color: #002200;">&#93;</span>; &nbsp; &nbsp;<br />
<br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Draw arrow</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>path moveToPoint<span style="color: #002200;">:</span>NSMakePoint<span style="color: #002200;">&#40;</span>frameRect.size.width<span style="color: #002200;">-</span><span style="color: #2400d9;">95</span>, frameRect.size.height<span style="color: #002200;">-</span><span style="color: #2400d9;">20</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>path lineToPoint<span style="color: #002200;">:</span>NSMakePoint<span style="color: #002200;">&#40;</span>frameRect.size.width<span style="color: #002200;">-</span><span style="color: #2400d9;">80</span>, frameRect.size.height<span style="color: #002200;">-</span><span style="color: #2400d9;">30</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>path lineToPoint<span style="color: #002200;">:</span>NSMakePoint<span style="color: #002200;">&#40;</span>frameRect.size.width<span style="color: #002200;">-</span><span style="color: #2400d9;">95</span>, frameRect.size.height<span style="color: #002200;">-</span><span style="color: #2400d9;">40</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #a61390;">float</span> red <span style="color: #002200;">=</span> <span style="color: #2400d9;">0.5</span>;<br />
&nbsp; &nbsp; <span style="color: #a61390;">float</span> green <span style="color: #002200;">=</span> <span style="color: #2400d9;">0.5</span>;<br />
&nbsp; &nbsp; <span style="color: #a61390;">float</span> blue <span style="color: #002200;">=</span> <span style="color: #2400d9;">0.5</span>; &nbsp; &nbsp;<br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/"><span style="color: #400080;">NSColor</span></a> <span style="color: #002200;">*</span>startingColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/"><span style="color: #400080;">NSColor</span></a> colorWithCalibratedRed<span style="color: #002200;">:</span>red<span style="color: #002200;">+</span>0.3f<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;green<span style="color: #002200;">:</span>green<span style="color: #002200;">+</span>0.3f<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; blue<span style="color: #002200;">:</span>blue<span style="color: #002200;">+</span>0.3f<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;alpha<span style="color: #002200;">:</span><span style="color: #2400d9;">1.0</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/"><span style="color: #400080;">NSColor</span></a> <span style="color: #002200;">*</span>endingColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/"><span style="color: #400080;">NSColor</span></a> colorWithCalibratedRed<span style="color: #002200;">:</span>red<span style="color: #002200;">-</span>0.05f<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;green<span style="color: #002200;">:</span>green<span style="color: #002200;">-</span>0.05f<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; blue<span style="color: #002200;">:</span>blue<span style="color: #002200;">-</span>0.05f<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;alpha<span style="color: #002200;">:</span><span style="color: #2400d9;">1.0</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSGradient_Class/"><span style="color: #400080;">NSGradient</span></a> <span style="color: #002200;">*</span>gradient <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSGradient_Class/"><span style="color: #400080;">NSGradient</span></a> alloc<span style="color: #002200;">&#93;</span> initWithStartingColor<span style="color: #002200;">:</span>startingColor<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; endingColor<span style="color: #002200;">:</span>endingColor<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>path fill<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>gradient drawInBezierPath<span style="color: #002200;">:</span>path angle<span style="color: #002200;">:-</span><span style="color: #2400d9;">90</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSGraphicsContext_Class/"><span style="color: #400080;">NSGraphicsContext</span></a> restoreGraphicsState<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>shadow release<span style="color: #002200;">&#93;</span>;</div></td></tr></tbody></table></div>
<p><a href='http://www.developers-life.com/wp-content/uploads/2011/07/MessageBox.zip' target="_blank">MessageBox sources</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/custom-message-box.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Вакансии Injoit Ltd</title>
		<link>http://www.developers-life.com/%d0%b2%d0%b0%d0%ba%d0%b0%d0%bd%d1%81%d0%b8%d0%b8-injoit-ltd.html</link>
		<comments>http://www.developers-life.com/%d0%b2%d0%b0%d0%ba%d0%b0%d0%bd%d1%81%d0%b8%d0%b8-injoit-ltd.html#comments</comments>
		<pubDate>Fri, 15 Apr 2011 09:59:58 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[others]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1217</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" src="http://qrcode.kaywa.com/img.php?s=6&amp;d=https%3A%2F%2Fsites.google.com%2Fa%2Finjoit.com%2Finjoithr%2F" alt="" width="234" height="234" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/%d0%b2%d0%b0%d0%ba%d0%b0%d0%bd%d1%81%d0%b8%d0%b8-injoit-ltd.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrate High Scores service of mob1serv</title>
		<link>http://www.developers-life.com/integrate-high-scores-service-of-mob1serv.html</link>
		<comments>http://www.developers-life.com/integrate-high-scores-service-of-mob1serv.html#comments</comments>
		<pubDate>Mon, 08 Nov 2010 15:32:14 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mob1serv]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[others]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1143</guid>
		<description><![CDATA[Для начала нужно немного ознакомиться на сайте mob1serv как это работает. Скачать либу с сайта или которую собрал я, немного модифицированную, добавил пару расширений. В мой версии также вложен пример с сайта mob1serv. Начнем&#8230; 1. Нам нужно проверить интернет соединение, лучше всего воспользоваться Reachability, уже готовым решением от разработчиков Apple. На этом моменте останавливаться не [...]]]></description>
			<content:encoded><![CDATA[<p>Для начала нужно немного ознакомиться на сайте <a href="http://www.mob1serv.com/high-scores/" target="blank">mob1serv</a> как это работает.</p>
<p>Скачать либу с <a href="http://mob1serv.com/downloads/library/HighscoresLibPackage.zip" target="blank">сайта</a> или которую <a href="http://depositfiles.com/files/bnmp5giee" target="blank">собрал я</a>, немного модифицированную, добавил пару расширений. В мой версии также вложен <a href="http://mob1serv.com/downloads/sample_projects/HighscoresTestExample.zip" target="blank">пример</a> с сайта mob1serv.</p>
<p>Начнем&#8230;</p>
<p>1. Нам нужно проверить интернет соединение, лучше всего воспользоваться <a href="http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html" target="blank">Reachability</a>, уже готовым решением от разработчиков Apple. На этом моменте останавливаться не будем, в примере все показано.</p>
<p>2. Перед тем как мы будем работать непосредственно с API либы, продемострирую как ее подключить к проекту<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/Ion6xx4cJg8?hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/Ion6xx4cJg8?hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><span id="more-1143"></span><br />
3. Необходимо зайти на admin.mob1serv.com и создать учетную запись.<br />
- войти и создать новое приложение, нажав на &#8220;+ Add a new Application&#8221;;<br />
- выбрать HighScores -&gt; Edit game modes и обавить mode;<br />
<a href="http://gyazo.com/47b57c8d30195091bdba8a5749eb66cc.png"><img src="http://gyazo.com/47b57c8d30195091bdba8a5749eb66cc.png" alt="" width="294" height="118" /></a><br />
- перейти на вкладку Connection Info и узнать информацию для подключения.<br />
<a href="http://gyazo.com/9eafb8c9c76106b930ad0c292cbc815a.png"><img src="http://gyazo.com/9eafb8c9c76106b930ad0c292cbc815a.png" alt="" width="334" height="204" /></a></p>
<p>4. Вот теперь начнем писать код.</p>
<p>Подпишемся/отпишемся на нотификации</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> subscribe <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/"><span style="color: #400080;">NSNotificationCenter</span></a> defaultCenter<span style="color: #002200;">&#93;</span> addObserver<span style="color: #002200;">:</span>self selector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>informationGettedNotificationReceived<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span> name<span style="color: #002200;">:</span>kHighScoresNotificationInformatioGetted object<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/"><span style="color: #400080;">NSNotificationCenter</span></a> defaultCenter<span style="color: #002200;">&#93;</span> addObserver<span style="color: #002200;">:</span>self selector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>successNotificationReceived<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span> name<span style="color: #002200;">:</span>kMobservNotificationAccessTokenReceived object<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/"><span style="color: #400080;">NSNotificationCenter</span></a> defaultCenter<span style="color: #002200;">&#93;</span> addObserver<span style="color: #002200;">:</span>self selector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>errorNotificationReceived<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span> name<span style="color: #002200;">:</span>kMobservNotificationAccessTokenReceiveFailed object<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/"><span style="color: #400080;">NSNotificationCenter</span></a> defaultCenter<span style="color: #002200;">&#93;</span> addObserver<span style="color: #002200;">:</span>self selector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>scoreAddedNotificationReceived<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span> name<span style="color: #002200;">:</span>kHighScoresNotificationScoreAdded object<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/"><span style="color: #400080;">NSNotificationCenter</span></a> defaultCenter<span style="color: #002200;">&#93;</span> addObserver<span style="color: #002200;">:</span>self selector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>scoreGettedNotificationReceived<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span> name<span style="color: #002200;">:</span>kHighScoresNotificationScoreGetted object<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;subscribed <span style="color: #002200;">=</span> <span style="color: #a61390;">YES</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> unsubscribe <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/"><span style="color: #400080;">NSNotificationCenter</span></a> defaultCenter<span style="color: #002200;">&#93;</span> removeObserver<span style="color: #002200;">:</span>self name<span style="color: #002200;">:</span>kHighScoresNotificationInformatioGetted object<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/"><span style="color: #400080;">NSNotificationCenter</span></a> defaultCenter<span style="color: #002200;">&#93;</span> removeObserver<span style="color: #002200;">:</span>self name<span style="color: #002200;">:</span>kMobservNotificationAccessTokenReceived object<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/"><span style="color: #400080;">NSNotificationCenter</span></a> defaultCenter<span style="color: #002200;">&#93;</span> removeObserver<span style="color: #002200;">:</span>self name<span style="color: #002200;">:</span>kMobservNotificationAccessTokenReceiveFailed object<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/"><span style="color: #400080;">NSNotificationCenter</span></a> defaultCenter<span style="color: #002200;">&#93;</span> removeObserver<span style="color: #002200;">:</span>self name<span style="color: #002200;">:</span>kHighScoresNotificationScoreAdded object<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/"><span style="color: #400080;">NSNotificationCenter</span></a> defaultCenter<span style="color: #002200;">&#93;</span> removeObserver<span style="color: #002200;">:</span>self name<span style="color: #002200;">:</span>kHighScoresNotificationScoreGetted object<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;subscribed <span style="color: #002200;">=</span> <span style="color: #a61390;">NO</span>;<br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p>Подключаемся  к серверу</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6e371a;">#define limitScores 25</span><br />
<br />
<span style="color: #6e371a;">#define mAppID 200</span><br />
<span style="color: #6e371a;">#define mGameID 400 // Ваш game id</span><br />
<span style="color: #6e371a;">#define mConsumerKey @&quot;sdfsadfjoisdf&quot;</span><br />
<span style="color: #6e371a;">#define mSecretKey @&quot;sdfsadfjoisdf&quot;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> connect <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;HighScoresService<span style="color: #002200;">*</span> hScore <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>HighScoresService sharedInstance<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;hScore.appid <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/"><span style="color: #400080;">NSNumber</span></a> numberWithInt<span style="color: #002200;">:</span>mAppID<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>hScore setConsumerKey<span style="color: #002200;">:</span>mConsumerKey andSecret<span style="color: #002200;">:</span>mSecretKey<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>hScore getAccessToken<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p>В случае успешного подключений приходит сообщение и сразу делаем запрос на обновление результатов</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>successNotificationReceived<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNotification_Class/"><span style="color: #400080;">NSNotification</span></a><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>notification <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>self refreshResults<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>refreshResults <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>scores removeAllObjects<span style="color: #002200;">&#93;</span>; <span style="color: #11740a; font-style: italic;">// array</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#40;</span>HighScoresService<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#91;</span>HighScoresService sharedInstance<span style="color: #002200;">&#93;</span> getScoresForGame<span style="color: #002200;">:</span>mGameID scoreLimit<span style="color: #002200;">:</span>limitScores<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p>Получаем информацию про запрашиваемые скоры  и сами скоры</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>informationGettedNotificationReceived<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNotification_Class/"><span style="color: #400080;">NSNotification</span></a><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>notification <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// так я сохраняю информацию о запросе</span><br />
&nbsp; &nbsp; &nbsp;self.dictInfo <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/"><span style="color: #400080;">NSDictionary</span></a><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#91;</span>notification.userInfo objectForKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;info&quot;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// получаю количество записей всего</span><br />
&nbsp; &nbsp; &nbsp;totalCount <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>self.dictInfo objectForKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;total_count&quot;</span><span style="color: #002200;">&#93;</span> intValue<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #11740a; font-style: italic;">// получаем скоры</span><br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>scoreGettedNotificationReceived<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNotification_Class/"><span style="color: #400080;">NSNotification</span></a><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>notification <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// get scores and insert ot array</span><br />
&nbsp; &nbsp; &nbsp;<a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/"><span style="color: #400080;">NSDictionary</span></a><span style="color: #002200;">*</span> dict <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/"><span style="color: #400080;">NSDictionary</span></a><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#91;</span>notification.userInfo objectForKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;result&quot;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;scores <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSMutableArray_Class/"><span style="color: #400080;">NSMutableArray</span></a> alloc<span style="color: #002200;">&#93;</span> initWithArray<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>dict objectForKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;scores&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;...<br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p>Пример добавления записи в онлайн скоры</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">HighScore<span style="color: #002200;">*</span> score <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>HighScore alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;<br />
score.index <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/"><span style="color: #400080;">NSNumber</span></a> numberWithInt<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span><span style="color: #002200;">&#93;</span>;<br />
score.limit <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/"><span style="color: #400080;">NSNumber</span></a> numberWithInt<span style="color: #002200;">:</span>limitScores<span style="color: #002200;">&#93;</span>;<br />
score.userName <span style="color: #002200;">=</span> name;<br />
score.value <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/"><span style="color: #400080;">NSNumber</span></a> numberWithInt<span style="color: #002200;">:</span>score<span style="color: #002200;">&#93;</span>;<br />
score.subgameId <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%d&quot;</span>,mGameID<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>HighScoresService sharedInstance<span style="color: #002200;">&#93;</span> addScore<span style="color: #002200;">:</span>score<span style="color: #002200;">&#93;</span>;</div></td></tr></tbody></table></div>
<p>В scoreAddedNotificationReceived:(NSNotification*)notification получим калбек с результатом добавления</p>
<p>Вот к примеру как можно получить следующие 25 результатов</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>loadMore25Scores <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>totalCount <span style="color: #002200;">!=</span> loadedScores<span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>HighScoresService sharedInstance<span style="color: #002200;">&#93;</span> getScoresForGame<span style="color: #002200;">:</span>idGame <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;scoreLimit<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>totalCount<span style="color: #002200;">-</span>limitScores &gt;<span style="color: #002200;">=</span> limitScores<span style="color: #002200;">&#41;</span>? limitScores <span style="color: #002200;">:</span> totalCount<span style="color: #002200;">-</span>loadedScores <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fromIndex<span style="color: #002200;">:</span>loadedScores <span style="color: #002200;">&#93;</span>; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loadedScores <span style="color: #002200;">+=</span> <span style="color: #002200;">&#40;</span>totalCount<span style="color: #002200;">-</span>limitScores &gt;<span style="color: #002200;">=</span> limitScores<span style="color: #002200;">&#41;</span>? limitScores <span style="color: #002200;">:</span> totalCount<span style="color: #002200;">-</span>loadedScores;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span><br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/integrate-high-scores-service-of-mob1serv.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

