<?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; UIImage</title>
	<atom:link href="http://www.developers-life.com/tag/uiimage/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>Color Picker for iOS</title>
		<link>http://www.developers-life.com/color-picker-for-ios.html</link>
		<comments>http://www.developers-life.com/color-picker-for-ios.html#comments</comments>
		<pubDate>Sat, 29 Oct 2011 12:17:25 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[UIColor]]></category>
		<category><![CDATA[UIImage]]></category>
		<category><![CDATA[Ukraine]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[Кодинг]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1302</guid>
		<description><![CDATA[Example: 1234567891011121314151617181920212223242526272829303132333435363738394041- &#40;void&#41;viewDidLoad &#123; &#160; &#160; &#91;super viewDidLoad&#93;; &#160; &#160; &#160; &#160; // Do any additional setup after loading the view, typically from a nib. &#160; &#160; &#160; &#160; if &#40;self.cPicker == nil&#41; &#123; &#160; &#160; &#160; &#160; &#91;self.view setBackgroundColor:&#91;UIColor grayColor&#93;&#93;; &#160; &#160; &#160; &#160; self.cPicker = &#91;&#91;VBColorPicker alloc&#93; initWithFrame:CGRectMake&#40;0, 0, 202, 202&#41;&#93;; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.developers-life.com/wp-content/uploads/2011/10/Screen-Shot-Color-Picker.png"><img class="alignnone size-full wp-image-1303" title="Screen Shot Color Picker" src="http://www.developers-life.com/wp-content/uploads/2011/10/Screen-Shot-Color-Picker.png" alt="" width="317" height="595" /></a></p>
<p>Example:</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 /></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>viewDidLoad<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>super viewDidLoad<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Do any additional setup after loading the view, typically from a nib.</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>self.cPicker <span style="color: #002200;">==</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>self.view setBackgroundColor<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIColor grayColor<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.cPicker <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>VBColorPicker 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;">202</span>, <span style="color: #2400d9;">202</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>_cPicker setCenter<span style="color: #002200;">:</span>self.view.center<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>self.view addSubview<span style="color: #002200;">:</span>_cPicker<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>_cPicker setDelegate<span style="color: #002200;">:</span>self<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>_cPicker showPicker<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// set default YES!</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>_cPicker setHideAfterSelection<span style="color: #002200;">:</span><span style="color: #a61390;">NO</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; &nbsp;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #11740a; font-style: italic;">// set color from picker</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> pickedColor<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIColor <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>color <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>_rect setBackgroundColor<span style="color: #002200;">:</span>color<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>_cPicker hidePicker<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> touchesBegan<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSSet_Class/"><span style="color: #400080;">NSSet</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>touches withEvent<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIEvent <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>event <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">!</span><span style="color: #002200;">&#91;</span>_cPicker isHidden<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>_cPicker hidePicker<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#125;</span><br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #11740a; font-style: italic;">// show picker by double touch</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> touchesEnded<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSSet_Class/"><span style="color: #400080;">NSSet</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>touches withEvent<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIEvent <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>event <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; UITouch <span style="color: #002200;">*</span>touch <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>touches anyObject<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>touch.tapCount <span style="color: #002200;">==</span> <span style="color: #2400d9;">2</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>_cPicker setCenter<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>touch locationInView<span style="color: #002200;">:</span>self.view<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>_cPicker showPicker<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#125;</span><br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p><a href="https://github.com/sakrist/VBColorPicker" target="_blank"><img src="http://www.developers-life.com/wp-content/uploads/2011/08/github-logo-80px.png" alt="" title="github-logo-80px" width="130" height="80" class="alignnone size-full wp-image-1257" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/color-picker-for-ios.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Small feature with UIlabel</title>
		<link>http://www.developers-life.com/small-feature-with-uilabel.html</link>
		<comments>http://www.developers-life.com/small-feature-with-uilabel.html#comments</comments>
		<pubDate>Fri, 14 Jan 2011 22:24:44 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[QuartzCore]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[UIImage]]></category>
		<category><![CDATA[UIKit]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1180</guid>
		<description><![CDATA[Add framework QuartzCore 12345678910111213141516#import &#60;QuartzCore/QuartzCore.h&#62; UILabel *label = &#91;&#91;UILabel alloc&#93; init&#93;; &#160; &#160; &#160;&#91;label setTextColor:&#91;UIColor whiteColor&#93;&#93;; &#160; &#160; &#160;&#91;label setBackgroundColor:&#91;UIColor darkGrayColor&#93;&#93;; &#160; &#160; &#160; &#160; &#160; &#160;&#91;&#91;label layer&#93; setBorderWidth:2&#93;; &#160; &#160; &#160;&#91;&#91;label layer&#93; setCornerRadius:15&#93;; &#160; &#160; &#160;&#91;&#91;label layer&#93; setBorderColor:&#91;UIColor whiteColor&#93;.CGColor&#93;; &#160; &#160; &#160; &#160; &#160; &#160;&#91;label setAlpha:0.8&#93;; &#160; &#160; &#160;&#91;label setTextAlignment:UITextAlignmentCenter&#93;; &#160; &#160; &#160;&#91;label setFrame:CGRectMake&#40;0, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://gyazo.com/f25ca1777ec11e66c2ed2324d8365cdf.png"><img class="alignnone" title="label without QuartzCore" src="http://gyazo.com/f25ca1777ec11e66c2ed2324d8365cdf.png" alt="" width="323" height="182" /></a></p>
<p>Add framework QuartzCore</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 /></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;">#import &lt;QuartzCore/QuartzCore.h&gt;</span><br />
<br />
UILabel <span style="color: #002200;">*</span>label <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UILabel alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>label setTextColor<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIColor whiteColor<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>label setBackgroundColor<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIColor darkGrayColor<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>label layer<span style="color: #002200;">&#93;</span> setBorderWidth<span style="color: #002200;">:</span><span style="color: #2400d9;">2</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>label layer<span style="color: #002200;">&#93;</span> setCornerRadius<span style="color: #002200;">:</span><span style="color: #2400d9;">15</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>label layer<span style="color: #002200;">&#93;</span> setBorderColor<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIColor whiteColor<span style="color: #002200;">&#93;</span>.CGColor<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>label setAlpha<span style="color: #002200;">:</span><span style="color: #2400d9;">0.8</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>label setTextAlignment<span style="color: #002200;">:</span>UITextAlignmentCenter<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>label setFrame<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;">220</span>, <span style="color: #2400d9;">50</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>label setText<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Loading...&quot;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>label setCenter<span style="color: #002200;">:</span>window.center<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>window addSubview<span style="color: #002200;">:</span>label<span style="color: #002200;">&#93;</span>;</div></td></tr></tbody></table></div>
<p>Result:<br />
<a href="http://gyazo.com/efb2a31120577402cc82f51b9a3f395c.png"><img class="alignnone" title="label with QuartzCore" src="http://gyazo.com/efb2a31120577402cc82f51b9a3f395c.png" alt="" width="323" height="183" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/small-feature-with-uilabel.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UIImage and Memory</title>
		<link>http://www.developers-life.com/uiimage-and-memory.html</link>
		<comments>http://www.developers-life.com/uiimage-and-memory.html#comments</comments>
		<pubDate>Thu, 10 Jun 2010 11:43:22 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[UIImage]]></category>
		<category><![CDATA[UIKit]]></category>
		<category><![CDATA[Ukraine]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[Кодинг]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1023</guid>
		<description><![CDATA[+[UIImage imageNamed:] • Reads the ﬁle, uncompresses it, caches result • Cached copy of data is kept even if the UIImage is deallocated • Low memory condition causes cache to be purged. • No direct control over when cache is purged. • Use for small frequently drawn images. +[UIImage imageWithContentsOfFile:] • Just reads enough of [...]]]></description>
			<content:encoded><![CDATA[<p>+[UIImage imageNamed:]<br />
• Reads the ﬁle, uncompresses it, caches result<br />
• Cached copy of data is kept even if the UIImage is deallocated<br />
• Low memory condition causes cache to be purged.<br />
• No direct control over when cache is purged.<br />
• Use for small frequently drawn images.</p>
<p>+[UIImage imageWithContentsOfFile:]<br />
• Just reads enough of ﬁle to determine if it can open the ﬁle.<br />
• Reads and uncompresses the ﬁle each time it draws. Uses uncompressed size worth of memory only temporarily.<br />
• Assigning a UIImage created this way to a UIImageView or as the contents of a CALayer also causes it to read and uncompress the ﬁle. The UIImageView or CALayer keep the expanded version.<br />
<span id="more-1023"></span><br />
Memory Usage (in MB) 8.6 MB image used with UIImageView</p>
<table border="0" style="filter:none;font-size:12pt; border: 1px solid;">
<tr>
<td></td>
<td >imageNamed</td>
<td >imageWithContentsofFile</td>
</tr>
<tr>
<td >Initial</td>
<td>2.46</td>
<td>2.46</td>
</tr>
<tr>
<td>Load UIImage</td>
<td>11.12</td>
<td>2.51</td>
</tr>
<tr>
<td>Assign to UIImageView</td>
<td>11.09</td>
<td>11.09</td>
</tr>
<tr>
<td>Remove from UIImageView</td>
<td>11.12</td>
<td>2.51</td>
</tr>
</table>
<p>Memory Usage (in MB) 8.6 MB image used with UIView subclass (stored in instance variable and drawn with drawinRect: )</p>
<table border="0" style="filter:none; border: 1px solid;">
<tbody>
<tr>
<td></td>
<td>imageNamed</td>
<td>imageWithContentsofFile</td>
</tr>
<tr>
<td>Initial</td>
<td>2.73</td>
<td>2.73</td>
</tr>
<tr>
<td>Load UIImage</td>
<td>11.38</td>
<td>2.78</td>
</tr>
<tr>
<td>Assign to UIImageView</td>
<td>11.81</td>
<td>3.20</td>
</tr>
<tr>
<td>Remove from UIImageView</td>
<td>11.84</td>
<td>3.04</td>
</tr>
</tbody>
</table>
<p>Спасибо за некоторые пояснения Андрею Копаневу :)</p>
<p><a href="https://docs.google.com/fileview?id=0B2KSahvz-4DXOTFhM2Y5MzQtODkyZC00N2ExLWE0MWQtNjI2N2NiYTBkNzZh&amp;hl=ru">И вот этому документу</a> &#8211; Robert Clair</p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/uiimage-and-memory.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Streatch image with  stretchableImageWithLeftCapWidth: topCapHeight:</title>
		<link>http://www.developers-life.com/streatch-image.html</link>
		<comments>http://www.developers-life.com/streatch-image.html#comments</comments>
		<pubDate>Wed, 10 Mar 2010 14:43:38 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[UIImage]]></category>
		<category><![CDATA[UIInterface]]></category>
		<category><![CDATA[UIKit]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=924</guid>
		<description><![CDATA[Sample 1234567891011121314151617+ &#40;UIImage*&#41;greenBubble &#123; &#160; &#160; if &#40;sGreenBubble == nil&#41; &#123; &#160; &#160; &#160; &#160; UIImage *i = &#91;UIImage imageNamed:@&#34;Balloon_1.png&#34;&#93;; &#160; &#160; &#160; &#160; sGreenBubble = &#91;&#91;i stretchableImageWithLeftCapWidth:15 topCapHeight:13&#93; retain&#93;; &#160; &#160; &#125; &#160; &#160; return sGreenBubble; &#125; + &#40;UIImage*&#41;grayBubble &#123; &#160; &#160; if &#40;sGrayBubble == nil&#41; &#123; &#160; &#160; &#160; &#160; UIImage *i = [...]]]></description>
			<content:encoded><![CDATA[<p>Sample</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>UIImage<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>greenBubble<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>sGreenBubble <span style="color: #002200;">==</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; UIImage <span style="color: #002200;">*</span>i <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIImage imageNamed<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Balloon_1.png&quot;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; sGreenBubble <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>i stretchableImageWithLeftCapWidth<span style="color: #002200;">:</span><span style="color: #2400d9;">15</span> topCapHeight<span style="color: #002200;">:</span><span style="color: #2400d9;">13</span><span style="color: #002200;">&#93;</span> retain<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">return</span> sGreenBubble;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">+</span> <span style="color: #002200;">&#40;</span>UIImage<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>grayBubble<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>sGrayBubble <span style="color: #002200;">==</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; UIImage <span style="color: #002200;">*</span>i <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIImage imageNamed<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Balloon_2.png&quot;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; sGrayBubble <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>i stretchableImageWithLeftCapWidth<span style="color: #002200;">:</span><span style="color: #2400d9;">21</span> topCapHeight<span style="color: #002200;">:</span><span style="color: #2400d9;">13</span><span style="color: #002200;">&#93;</span> retain<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">return</span> sGrayBubble;<br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p>Results:<br />
<span id="more-924"></span><br />
<img class="alignleft" src="http://gyazo.com/34d1577d68badfe8896178eb0a708fa5.png" alt="" width="186" height="345" /><br />
or<br />
<img class="alignnone" src="http://gyazo.com/fb5038e96245fed58764ce1ba8e82902.png" alt="" width="178" height="333" /></p>
<p>испоьзовал 2 картинки<br />
<img class="alignleft" src="http://gyazo.com/585d12ee517fcfe2dfd5a7740446633b.png" alt="" width="43" height="32" /><img class="alignnone" src="http://gyazo.com/ecdc3ecdf52bda4d41cd677c90533e77.png" alt="" width="56" height="56" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/streatch-image.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Radio buttons for iPhone application</title>
		<link>http://www.developers-life.com/radio-buttons-in-iphone-application.html</link>
		<comments>http://www.developers-life.com/radio-buttons-in-iphone-application.html#comments</comments>
		<pubDate>Wed, 03 Feb 2010 00:47:26 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[Private]]></category>
		<category><![CDATA[UIButton]]></category>
		<category><![CDATA[UIImage]]></category>
		<category><![CDATA[UIKit]]></category>
		<category><![CDATA[Кодинг]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=864</guid>
		<description><![CDATA[Presented simple and nice solution for radio buttons, based on the UIButton. Add buttons on view of controller 123456789for &#40;int i = 0; i &#60; 5; i++&#41; &#123; &#160; &#160; &#160; &#160; &#160; UIButton *but = &#91;UIButton buttonWithType:UIButtonTypeCustom&#93;; &#160; &#160; &#160; &#160; &#160; &#91;but setImage:&#91;UIImage imageNamed:@&#34;checkbox.png&#34;&#93; forState:UIControlStateNormal&#93;; &#160; &#160; &#160; &#160; &#160; &#91;but setImage:&#91;UIImage imageNamed:@&#34;checkedbox.png&#34;&#93; [...]]]></description>
			<content:encoded><![CDATA[<p>Presented simple and nice solution for radio buttons, based on the UIButton.</p>
<p>Add buttons on view of controller</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 /></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: #a61390;">for</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span> i <span style="color: #002200;">=</span> <span style="color: #2400d9;">0</span>; i &lt; <span style="color: #2400d9;">5</span>; i<span style="color: #002200;">++</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UIButton <span style="color: #002200;">*</span>but <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIButton buttonWithType<span style="color: #002200;">:</span>UIButtonTypeCustom<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>but setImage<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIImage imageNamed<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;checkbox.png&quot;</span><span style="color: #002200;">&#93;</span> forState<span style="color: #002200;">:</span>UIControlStateNormal<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>but setImage<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIImage imageNamed<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;checkedbox.png&quot;</span><span style="color: #002200;">&#93;</span> forState<span style="color: #002200;">:</span>UIControlStateSelected<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>but setFrame<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;">17</span>, <span style="color: #2400d9;">17</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>but setCenter<span style="color: #002200;">:</span>CGPointMake<span style="color: #002200;">&#40;</span> <span style="color: #2400d9;">50</span>, &nbsp;i<span style="color: #002200;">*</span><span style="color: #2400d9;">40</span><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; &nbsp; <span style="color: #002200;">&#91;</span>but addTarget<span style="color: #002200;">:</span>self action<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>checkboxButton<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span> forControlEvents<span style="color: #002200;">:</span>UIControlEventTouchUpInside<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>self.view addSubview<span style="color: #002200;">:</span>but<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p><a href="http://gyazo.com/d1b32dba680d02954885fef2d0d072f7.png"><img alt="" src="http://gyazo.com/d1b32dba680d02954885fef2d0d072f7.png" class="alignnone" width="183" height="64" /></a></p>
<p><span id="more-864"></span><br />
Action for buttons:</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 /></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>IBAction<span style="color: #002200;">&#41;</span>checkboxButton<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIButton <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>button<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #a61390;">for</span> <span style="color: #002200;">&#40;</span>UIButton <span style="color: #002200;">*</span>but <span style="color: #a61390;">in</span> <span style="color: #002200;">&#91;</span>self.view subviews<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>but isKindOfClass<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIButton class<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span> <span style="color: #002200;">&amp;&amp;</span> <span style="color: #002200;">!</span><span style="color: #002200;">&#91;</span>but isEqual<span style="color: #002200;">:</span>button<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>but setSelected<span style="color: #002200;">:</span><span style="color: #a61390;">NO</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">!</span>button.selected<span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; button.selected <span style="color: #002200;">=</span> <span style="color: #002200;">!</span>button.selected;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span><br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p><a href="http://depositfiles.com/files/6m7x0q40l">you can will get UI from here</a></p>
<p>good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/radio-buttons-in-iphone-application.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Change RGB color of the picture</title>
		<link>http://www.developers-life.com/change-color.html</link>
		<comments>http://www.developers-life.com/change-color.html#comments</comments>
		<pubDate>Thu, 21 Jan 2010 21:20:09 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[UIImage]]></category>
		<category><![CDATA[UIKit]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=778</guid>
		<description><![CDATA[Change RGB color of the picture 12345678910111213141516171819202122232425262728293031323334353637383940414243- &#40;UIImage *&#41; changeColor: &#40;UIImage *&#41;image &#123; &#160; &#160; &#160;UIGraphicsBeginImageContext&#40;image.size&#41;; &#160; &#160; &#160; &#160; &#160; &#160;CGRect contextRect; &#160; &#160; &#160;contextRect.origin.x = 0.0f; &#160; &#160; &#160;contextRect.origin.y = 0.0f; &#160; &#160; &#160;contextRect.size = &#91;image size&#93;; &#160; &#160; &#160;// Retrieve source image and begin image context &#160; &#160; &#160;CGSize itemImageSize = &#91;image [...]]]></description>
			<content:encoded><![CDATA[<p>Change RGB color of the picture</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 /></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>UIImage <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> changeColor<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span>UIImage <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>image <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;UIGraphicsBeginImageContext<span style="color: #002200;">&#40;</span>image.size<span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;CGRect contextRect;<br />
&nbsp; &nbsp; &nbsp;contextRect.origin.x <span style="color: #002200;">=</span> 0.0f;<br />
&nbsp; &nbsp; &nbsp;contextRect.origin.y <span style="color: #002200;">=</span> 0.0f;<br />
&nbsp; &nbsp; &nbsp;contextRect.size <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>image size<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// Retrieve source image and begin image context</span><br />
&nbsp; &nbsp; &nbsp;CGSize itemImageSize <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>image size<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;CGPoint itemImagePosition; <br />
&nbsp; &nbsp; &nbsp;itemImagePosition.x <span style="color: #002200;">=</span> ceilf<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#40;</span>contextRect.size.width <span style="color: #002200;">-</span> itemImageSize.width<span style="color: #002200;">&#41;</span> <span style="color: #002200;">/</span> <span style="color: #2400d9;">2</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;itemImagePosition.y <span style="color: #002200;">=</span> ceilf<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#40;</span>contextRect.size.height <span style="color: #002200;">-</span> itemImageSize.height<span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;UIGraphicsBeginImageContext<span style="color: #002200;">&#40;</span>contextRect.size<span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;CGContextRef c <span style="color: #002200;">=</span> UIGraphicsGetCurrentContext<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// Setup shadow</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// Setup transparency layer and clip to mask</span><br />
&nbsp; &nbsp; &nbsp;CGContextBeginTransparencyLayer<span style="color: #002200;">&#40;</span>c, <span style="color: #a61390;">NULL</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;CGContextScaleCTM<span style="color: #002200;">&#40;</span>c, <span style="color: #2400d9;">1.0</span>, <span style="color: #002200;">-</span><span style="color: #2400d9;">1.0</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;CGContextClipToMask<span style="color: #002200;">&#40;</span>c, CGRectMake<span style="color: #002200;">&#40;</span>itemImagePosition.x, <span style="color: #002200;">-</span>itemImagePosition.y, itemImageSize.width, <span style="color: #002200;">-</span>itemImageSize.height<span style="color: #002200;">&#41;</span>, <span style="color: #002200;">&#91;</span>image CGImage<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #a61390;">switch</span> <span style="color: #002200;">&#40;</span>colorSelected<span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #a61390;">case</span> <span style="color: #2400d9;">0</span><span style="color: #002200;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CGContextSetRGBFillColor<span style="color: #002200;">&#40;</span>c, <span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">1</span>, <span style="color: #2400d9;">1</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #a61390;">break</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #a61390;">default</span><span style="color: #002200;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CGContextSetRGBFillColor<span style="color: #002200;">&#40;</span>c, <span style="color: #2400d9;">1</span>, <span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">0</span>., <span style="color: #2400d9;">1</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #a61390;">break</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;contextRect.size.height <span style="color: #002200;">=</span> <span style="color: #002200;">-</span>contextRect.size.height;<br />
&nbsp; &nbsp; &nbsp;contextRect.size.height <span style="color: #002200;">-=</span> <span style="color: #2400d9;">15</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// Fill and end the transparency layer</span><br />
&nbsp; &nbsp; &nbsp;CGContextFillRect<span style="color: #002200;">&#40;</span>c, contextRect<span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;CGContextEndTransparencyLayer<span style="color: #002200;">&#40;</span>c<span style="color: #002200;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp;UIImage <span style="color: #002200;">*</span>img <span style="color: #002200;">=</span> UIGraphicsGetImageFromCurrentImageContext<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;UIGraphicsEndImageContext<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #a61390;">return</span> img;<br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/change-color.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Source of SlideShow</title>
		<link>http://www.developers-life.com/source-of-slideshow.html</link>
		<comments>http://www.developers-life.com/source-of-slideshow.html#comments</comments>
		<pubDate>Fri, 20 Nov 2009 02:16:20 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[UIImage]]></category>
		<category><![CDATA[Кодинг]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=669</guid>
		<description><![CDATA[Реализация слайдшоу! Мелочь, которую можно быстро вставить в свой проект! Компакто, в плане кода! Спасибо разработчику, ресурс! Mirror]]></description>
			<content:encoded><![CDATA[<p>Реализация слайдшоу!<br />
Мелочь, которую можно быстро вставить в свой проект!<br />
Компакто, в плане кода!</p>
<p><img class="alignleft" title="SlideShow" src="http://gyazo.com/357e3034bd265d2af1e05466abf8226f.png" alt="" width="122" height="228" /></p>
<p>Спасибо разработчику, <noindex><a href="http://lievendekeyser.net/index.php?module=messagebox&amp;action=message&amp;msg_id=1351">ресурс</a>!</noindex></p>
<p><a href="http://www.developers-life.com/files/SlideShow.zip">Mirror</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/source-of-slideshow.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Дизайним интерфейс в приложениях iPhone</title>
		<link>http://www.developers-life.com/interface-design-for-iphone-applications.html</link>
		<comments>http://www.developers-life.com/interface-design-for-iphone-applications.html#comments</comments>
		<pubDate>Tue, 17 Feb 2009 20:00:33 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[UIImage]]></category>
		<category><![CDATA[UIKit]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=338</guid>
		<description><![CDATA[На сегодняшний день всем хочется красивости и примочек, iPhone приложения не исключения! Вот реализовал по своему. Может кому покажется не так. Если у вас есть другие, более оптимальные варианты реализации, буду рад выслушать. Вот что из этого получилось: Объект first выдвигается и задвигается с левой стороны, а second с правой стороны, плюс можно перемещать за [...]]]></description>
			<content:encoded><![CDATA[<p>На сегодняшний день всем хочется красивости и примочек, iPhone приложения не исключения! Вот реализовал по своему. Может кому покажется не так. Если у вас есть другие, более оптимальные варианты реализации, буду рад выслушать.<br />
<center>Вот что из этого получилось:<img src="http://www.developers-life.com/wp-content/uploads/2009/02/Picture-2.jpg" alt="iphone design application dev" width="270" height="485" /></center></p>
<p>Объект first выдвигается и задвигается с левой стороны, а second с правой стороны, плюс можно перемещать за любое место этого объекта. Эти свойства добавляют юзабилити интерфейсу.</p>
<p>Плюсы:<br />
1. Красиво<br />
2. Динамическое изменение размера без потери качества.</p>
<p>Минусы:<br />
1. Когда центр попадает не на четкие координаты шрифты могут искажаться и разъезжаться картинки. Если окошко не динамическое лучше использовать статическую картинку.<br />
<span id="more-338"></span><br />
Реализовал с помощью 9 картинок, 4 уголков, 4 боковых, и фона. Всего 1 небольшой класс в котором производятся автоматические расчеты и выставление рисунков от заданных размеров при инициализации или с помощью метода setFrame.</p>
<p>Выкладываю source примера, разрешаю изменять код, использовать в своих целях, но прошу оставить авторство кода. И при копировании статьи оставлять линк на источник. Закидываю без комментариев, чтоб сами разобрались ;)<br />
<a href="http://www.developers-life.com/wp-content/plugins/download_counter/redirect.php?id=4" target="_blank"><img src="http://www.developers-life.com/wp-content/plugins/download_counter/redirect.php?pid=4" border="0" alt="Beautiful Window" height="0" width="0"/>Beautiful Window</a><br />
please comment this post</p>
<p>Код автоматических расчетов для View:</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 />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<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; &nbsp;<span style="color: #002200;">&#91;</span>topLeft setFrame<span style="color: #002200;">:</span>CGRectMake<span style="color: #002200;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #2400d9;">0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, <span style="color: #2400d9;">0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, topLeft.image.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, topLeft.image.size.height<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>self addSubview<span style="color: #002200;">:</span>topLeft<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>topRight setFrame<span style="color: #002200;">:</span>CGRectMake<span style="color: #002200;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frame.size.width<span style="color: #002200;">-</span>topRight.image.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #2400d9;">0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , topRight.image.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , topRight.image.size.height<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>self addSubview<span style="color: #002200;">:</span>topRight<span style="color: #002200;">&#93;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>top setFrame<span style="color: #002200;">:</span>CGRectMake<span style="color: #002200;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; topLeft.image.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #2400d9;">0</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , frame.size.width<span style="color: #002200;">-</span>topRight.image.size.width<span style="color: #002200;">-</span>topLeft.image.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , top.image.size.height<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>self addSubview<span style="color: #002200;">:</span>top<span style="color: #002200;">&#93;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>bottomLeft setFrame<span style="color: #002200;">:</span>CGRectMake<span style="color: #002200;">&#40;</span><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;<span style="color: #2400d9;">0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, frame.size.height<span style="color: #002200;">-</span>bottomLeft.image.size.height<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, bottomLeft.image.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, bottomLeft.image.size.height<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>self addSubview<span style="color: #002200;">:</span>bottomLeft<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>bottomRight setFrame<span style="color: #002200;">:</span>CGRectMake<span style="color: #002200;">&#40;</span><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; frame.size.width<span style="color: #002200;">-</span>bottomRight.image.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , frame.size.height<span style="color: #002200;">-</span>bottomRight.image.size.height<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , bottomRight.image.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , bottomRight.image.size.height<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>self addSubview<span style="color: #002200;">:</span>bottomRight<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>bottom setFrame<span style="color: #002200;">:</span>CGRectMake<span style="color: #002200;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bottomLeft.frame.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , frame.size.height<span style="color: #002200;">-</span>bottom.image.size.height <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , frame.size.width<span style="color: #002200;">-</span>bottomRight.frame.size.width<span style="color: #002200;">-</span>bottomLeft.frame.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , bottom.image.size.height<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>self addSubview<span style="color: #002200;">:</span>bottom<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>left setFrame<span style="color: #002200;">:</span>CGRectMake<span style="color: #002200;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #2400d9;">0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, topLeft.frame.size.height <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, left.image.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, frame.size.height<span style="color: #002200;">-</span>topLeft.frame.size.height<span style="color: #002200;">-</span>bottomLeft.frame.size.height<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>self addSubview<span style="color: #002200;">:</span>left<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>right setFrame<span style="color: #002200;">:</span>CGRectMake<span style="color: #002200;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;frame.size.width<span style="color: #002200;">-</span>right.image.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , topRight.frame.size.height <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , right.image.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , frame.size.height<span style="color: #002200;">-</span>topRight.frame.size.height<span style="color: #002200;">-</span>bottomRight.frame.size.height<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>self addSubview<span style="color: #002200;">:</span>right<span style="color: #002200;">&#93;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>background setFrame<span style="color: #002200;">:</span>CGRectMake<span style="color: #002200;">&#40;</span><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;left.frame.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, topRight.frame.size.height <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, frame.size.width<span style="color: #002200;">-</span>left.frame.size.width<span style="color: #002200;">-</span>right.frame.size.width<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, frame.size.height<span style="color: #002200;">-</span>topRight.frame.size.height<span style="color: #002200;">-</span>bottomRight.frame.size.height<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#91;</span>self addSubview<span style="color: #002200;">:</span>background<span style="color: #002200;">&#93;</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 />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>UIImage<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>greenBubble<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>sGreenBubble <span style="color: #002200;">==</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; UIImage <span style="color: #002200;">*</span>i <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIImage imageNamed<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Balloon_1.png&quot;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; sGreenBubble <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>i stretchableImageWithLeftCapWidth<span style="color: #002200;">:</span><span style="color: #2400d9;">15</span> topCapHeight<span style="color: #002200;">:</span><span style="color: #2400d9;">13</span><span style="color: #002200;">&#93;</span> retain<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">return</span> sGreenBubble;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">+</span> <span style="color: #002200;">&#40;</span>UIImage<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>grayBubble<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>sGrayBubble <span style="color: #002200;">==</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; UIImage <span style="color: #002200;">*</span>i <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIImage imageNamed<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Balloon_2.png&quot;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; sGrayBubble <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>i stretchableImageWithLeftCapWidth<span style="color: #002200;">:</span><span style="color: #2400d9;">21</span> topCapHeight<span style="color: #002200;">:</span><span style="color: #2400d9;">13</span><span style="color: #002200;">&#93;</span> retain<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">return</span> sGrayBubble;<br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p>Вот результат</p>
<p><img class="alignleft" src="http://gyazo.com/34d1577d68badfe8896178eb0a708fa5.png" alt="" width="232" height="431" /><img class="alignnone" src="http://gyazo.com/fb5038e96245fed58764ce1ba8e82902.png" alt="" width="223" height="416" /></p>
<p>а испоьзовал 2 картинки<br />
<img alt="" src="http://gyazo.com/585d12ee517fcfe2dfd5a7740446633b.png" class="alignleft" width="43" height="32" /><img alt="" src="http://gyazo.com/ecdc3ecdf52bda4d41cd677c90533e77.png" class="alignnone" width="56" height="56" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/interface-design-for-iphone-applications.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

