<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2106395914766249392</id><updated>2025-12-12T12:22:43.116-08:00</updated><title type='text'>iOS Development For Beginners</title><subtitle type='html'>A Very latest and advanced blog for Beginners of iOS Development.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-2163526398345783668</id><published>2012-12-16T23:15:00.003-08:00</published><updated>2012-12-16T23:15:51.926-08:00</updated><title type='text'>How to find a KEY from NSDictionary?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Here we will take NSMutableArray with objects and NSDictionary with Objects and Keys.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;








&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;







&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;NSMutableArray&lt;/b&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;* mArray = [[&lt;/b&gt;&lt;/span&gt;&lt;b&gt;NSMutableArray&lt;/b&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;alloc&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;initWithObjects&lt;/b&gt;&lt;/span&gt;&lt;b&gt;:&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;A&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;,&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;B&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;,&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;C&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;,&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;D&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;,&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;E&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;,&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;F&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;, &lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;nil&lt;/b&gt;&lt;/span&gt;&lt;b&gt;];&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &lt;/b&gt;&lt;/span&gt;&lt;b&gt;NSMutableDictionary&lt;/b&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt; *mDic = [&lt;/b&gt;&lt;/span&gt;&lt;b&gt;NSMutableDictionary&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;dictionaryWithObjectsAndKeys&lt;/b&gt;&lt;/span&gt;&lt;b&gt;:&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;F&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;,&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;mF&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;,&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;G&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;,&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;mG&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;,&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;B&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;,&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;mB&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;,&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;I&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;,&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;@&quot;mI&quot;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;,&lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;nil&lt;/b&gt;&lt;/span&gt;&lt;b&gt;];&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
We will write a Function which can provide us the array of founded keys after&amp;nbsp;comparison.&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;







&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;-(&lt;/b&gt;&lt;/span&gt;&lt;b&gt;NSMutableArray&lt;/b&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;*)compareMyObject:(&lt;/b&gt;&lt;/span&gt;&lt;b&gt;NSMutableArray&lt;/b&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;*)array:(&lt;/b&gt;&lt;/span&gt;&lt;b&gt;NSDictionary&lt;/b&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;*)dic&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &lt;/b&gt;&lt;/span&gt;&lt;b&gt;NSMutableArray&lt;/b&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;* keysArray = [[&lt;/b&gt;&lt;/span&gt;&lt;b&gt;NSMutableArray&lt;/b&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;alloc&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;] &lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;init&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;];&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt; &lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;for&lt;/b&gt;&lt;/span&gt;&lt;b&gt;(&lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;int&lt;/b&gt;&lt;/span&gt;&lt;b&gt; k=&lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;b&gt;;k&amp;lt;[array &lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;count&lt;/b&gt;&lt;/span&gt;&lt;b&gt;];k++)&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;{&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;NSString&lt;/b&gt;&lt;/span&gt;&lt;b&gt;* mStr = [array &lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;objectAtIndex&lt;/b&gt;&lt;/span&gt;&lt;b&gt;:k];&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/b&gt;&lt;span class=&quot;s3&quot;&gt;&lt;b&gt;NSArray&lt;/b&gt;&lt;/span&gt;&lt;b&gt;* array = [dic &lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;allKeysForObject&lt;/b&gt;&lt;/span&gt;&lt;b&gt;:mStr];&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&lt;b&gt;([array &lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;count&lt;/b&gt;&lt;/span&gt;&lt;b&gt;])&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [keysArray &lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;addObject&lt;/b&gt;&lt;/span&gt;&lt;b&gt;:[array &lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;objectAtIndex&lt;/b&gt;&lt;/span&gt;&lt;b&gt;:&lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;b&gt;]];&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;return&lt;/b&gt;&lt;/span&gt;&lt;b&gt; keysArray;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
Now we will call this method in the following format.&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;







&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;NSMutableArray&lt;/b&gt;&lt;/span&gt;&lt;b&gt;* keysArray =&amp;nbsp; [&lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;self&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;compareMyObject&lt;/b&gt;&lt;/span&gt;&lt;b&gt;:mArray:mDic];&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
The above method gives us the result array now, We will print and check those results.&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;







&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;NSLog&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;b&gt;@&quot;total %d keys found. Those are %@&quot;&lt;/b&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;,[keysArray &lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;count&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;],[keysArray &lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&lt;b&gt;description&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;]);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;The result is :&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;







&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;keysArray = (&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; mB,&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; mF&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;b&gt;)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/2163526398345783668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2012/12/how-to-find-key-from-nsdictionary.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/2163526398345783668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/2163526398345783668'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2012/12/how-to-find-key-from-nsdictionary.html' title='How to find a KEY from NSDictionary?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-2586734119269023495</id><published>2012-02-01T20:07:00.000-08:00</published><updated>2012-02-15T08:29:33.303-08:00</updated><title type='text'>How to capture the screen with frame specific?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; CGRect mRect = CGRectMake(0,0,730,905);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; UIGraphicsBeginImageContext(mRect.size);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.containerView.layer renderInContext:UIGraphicsGetCurrentContext()];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; UIGraphicsEndImageContext();&lt;br /&gt;
&lt;br /&gt;
mRect is any frame which you wanted to take screen shot and containerview is the view where we need to take the screenshot.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/2586734119269023495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2012/02/how-to-capture-he-screen-with-frame.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/2586734119269023495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/2586734119269023495'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2012/02/how-to-capture-he-screen-with-frame.html' title='How to capture the screen with frame specific?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-1934397314264380719</id><published>2012-02-01T05:12:00.000-08:00</published><updated>2012-02-01T20:08:18.918-08:00</updated><title type='text'>A small examples with Animations</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In iOS Sdk there are two types of animation which is used frequently.&lt;br /&gt;
&lt;br /&gt;
with CoreAnimation&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CATransition *animation = [CATransition animation];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [animation setDuration:1.5];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [animation setType:kCATransitionMoveIn];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [animation setSubtype:kCATransitionFromRight];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [animation setSpeed:1.5];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [[imageView layer] addAnimation:animation forKey:nil];&lt;br /&gt;
&lt;br /&gt;
Here imageView is the view where you need to apply the animation. the view with come from right to left with the specific duration.&lt;br /&gt;
&lt;br /&gt;
setDuration - to set the animation happen time&lt;br /&gt;
setType - to set the animation type&lt;br /&gt;
&lt;br /&gt;
see CATransition class to get more details.&lt;br /&gt;
&lt;br /&gt;
with UIAnimation&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [UIView beginAnimations:nil context:nil];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [UIView setAnimationDuration:2.0];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [UIView setAnimationDelay:1.0];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [UIView setAnimationDelegate:self];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; myImageView.alpha = 0.0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [UIView commitAnimations];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Here i wanted to hide the myImageview. Instead of hiding with&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; myImageView.hidden = YES;&lt;br /&gt;
I thought of adding some animation to hide the view.&lt;br /&gt;
It will hide the view in 2 sec after 1 sec of delay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have delegate methods to use more effectively. Just have a look at the Class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/1934397314264380719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2012/02/small-examples-with-animations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/1934397314264380719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/1934397314264380719'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2012/02/small-examples-with-animations.html' title='A small examples with Animations'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-7470446302757981528</id><published>2012-02-01T04:57:00.000-08:00</published><updated>2012-02-01T04:57:46.174-08:00</updated><title type='text'>How to print the Frame(CGRect) of a View?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@&quot;self.view.Frame=%@&quot;, NSStringFromCGRect(self.view.frame));&lt;br /&gt;
&lt;br /&gt;
Here self.view is the view of UIView Class. You can print any frame with this log.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/7470446302757981528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2012/02/how-to-print-framecgrect-of-view.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/7470446302757981528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/7470446302757981528'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2012/02/how-to-print-framecgrect-of-view.html' title='How to print the Frame(CGRect) of a View?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-6388041950285165394</id><published>2011-04-18T08:04:00.000-07:00</published><updated>2011-09-16T01:50:49.782-07:00</updated><title type='text'>jSon Parse</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;First Import the ASIHttpRequest Classes into our project. &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:location_cookie_url];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [request setDelegate:self];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; request.shouldRedirect = NO;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [request startAsynchronous];&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
- (void)requestFinished:(ASIHTTPRequest*)request&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ([[[request responseHeaders] objectForKey:@&quot;Set-Cookie&quot;] hasPrefix:@&quot;Preferences&quot;]) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:current_client_url];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSString*Strr = [NSString stringWithFormat:@&quot;{\&quot;IsMobile\&quot;: true, \&quot;offerGuid\&quot;: \&quot;%@\&quot;}&quot;,[self.mProduct objectForKey:@&quot;Guid&quot;]];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@&quot;%@&quot;,Strr);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [request appendPostData:[Strr dataUsingEncoding:NSUTF8StringEncoding]];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [request setDelegate:self];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [request addRequestHeader:@&quot;Content-Type&quot; value:@&quot;application/json; charset=utf-8&quot;];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [request startAsynchronous];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
- (void)requestFailed:(ASIHTTPRequest*)request&lt;br /&gt;
{&lt;br /&gt;
}&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/6388041950285165394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/04/json-parse.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/6388041950285165394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/6388041950285165394'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/04/json-parse.html' title='jSon Parse'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-8800886193866026199</id><published>2011-01-20T07:07:00.001-08:00</published><updated>2012-09-17T03:38:28.701-07:00</updated><title type='text'>How to reduce the distance between sections in UITableview</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Use all these methods to reduce the height between sections in tableview&lt;br /&gt;
&lt;br /&gt;
-(CGFloat)tableView:(UITableView*)tableView heightForHeaderInSection:(NSInteger)section&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 3.0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-(CGFloat)tableView:(UITableView*)tableView heightForFooterInSection:(NSInteger)section&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return 3.0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-(UIView*)tableView:(UITableView*)tableView viewForHeaderInSection:(NSInteger)section&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)] autorelease];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-(UIView*)tableView:(UITableView*)tableView viewForFooterInSection:(NSInteger)section&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)] autorelease];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;


&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-3672551402995103&quot;;
/* ios_468 */
google_ad_slot = &quot;2209404278&quot;;
google_ad_width = 468;
google_ad_height = 60;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/8800886193866026199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/how-to-reduce-distance-between-sections.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/8800886193866026199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/8800886193866026199'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/how-to-reduce-distance-between-sections.html' title='How to reduce the distance between sections in UITableview'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-7883846802899771044</id><published>2011-01-20T03:17:00.001-08:00</published><updated>2011-01-20T03:17:22.941-08:00</updated><title type='text'>Application should run on background or not</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;ol&gt;&lt;li&gt;Open your &lt;strong&gt;info.plist&lt;/strong&gt; file&lt;/li&gt;
&lt;li&gt;Add The Key &lt;strong&gt;UIApplicationExitsOnSuspend &lt;/strong&gt;or Select&lt;strong&gt; Application does not run in background&lt;br /&gt;
&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Set the new key to &lt;strong&gt;YES &lt;/strong&gt;or &lt;strong&gt;Fill in the tick box&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/7883846802899771044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/application-should-run-on-background-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/7883846802899771044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/7883846802899771044'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/application-should-run-on-background-or.html' title='Application should run on background or not'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-6493979546348888052</id><published>2011-01-19T00:40:00.001-08:00</published><updated>2011-01-19T00:40:42.450-08:00</updated><title type='text'>How to disable the sleep mode</title><content type='html'>&amp;nbsp;&amp;nbsp;&amp;nbsp; [[UIApplication sharedApplication] setIdleTimerDisabled:YES];</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/6493979546348888052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/how-to-disable-sleep-mode.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/6493979546348888052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/6493979546348888052'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/how-to-disable-sleep-mode.html' title='How to disable the sleep mode'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-2648549643313007436</id><published>2011-01-17T23:14:00.001-08:00</published><updated>2011-01-17T23:14:42.806-08:00</updated><title type='text'>Digital Font for the Label</title><content type='html'>[myLabel setFont:[UIFont fontWithName:@&quot;DBLCDTempBlack&quot; size:42.0]];</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/2648549643313007436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/digital-font-for-label.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/2648549643313007436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/2648549643313007436'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/digital-font-for-label.html' title='Digital Font for the Label'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-6850642693131352804</id><published>2011-01-14T09:33:00.000-08:00</published><updated>2011-01-14T09:38:14.571-08:00</updated><title type='text'>Generate Random Number in a given range</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;TestViewController.h&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; line-height: 14px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;font: normal normal normal 12px/normal Monaco, &#39;Courier New&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;line&quot; id=&quot;LC17&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1em; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line&quot; id=&quot;LC17&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1em; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;#define RANDOM_SEED() srandom((unsigned)(mach_absolute_time() &amp;amp; 0xFFFFFFFF))&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line&quot; id=&quot;LC18&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1em; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;#define RANDOM_NUM() (random())&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; white-space: pre;&quot;&gt;&lt;span class=&quot;err&quot; style=&quot;background-color: #e3d2d2; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;@&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; white-space: pre;&quot;&gt;&lt;span class=&quot;n&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;interface&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; white-space: pre;&quot;&gt; Test&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; white-space: pre;&quot;&gt;&lt;span class=&quot;n&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;ViewController&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; white-space: pre;&quot;&gt;&lt;span class=&quot;o&quot; style=&quot;font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; white-space: pre;&quot;&gt;&lt;span class=&quot;n&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;UIViewController&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px; white-space: pre;&quot;&gt;&lt;span class=&quot;n&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 21px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;TestViewController.m&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; line-height: 14px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;font: normal normal normal 12px/normal Monaco, &#39;Courier New&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;line&quot; id=&quot;LC13&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1em; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; line-height: 21px;&quot;&gt;#include &amp;lt;mach/mach_time.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.4em;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.4em;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;@implementation TestViewController&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.4em;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.4em;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;-(int)getRandomNumber&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.4em;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;  {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.4em;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; font-weight: normal; line-height: 14px; white-space: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;

&lt;pre style=&quot;font: normal normal normal 12px/normal Monaco, &#39;Courier New&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, monospace; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;line&quot; id=&quot;LC947&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1em; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; font-weight: normal; line-height: 14px; white-space: normal;&quot;&gt;&lt;span class=&quot;n&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;RANDOM_SEED&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line&quot; id=&quot;LC948&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1em; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; font-weight: normal; line-height: 14px; white-space: normal;&quot;&gt;&lt;span class=&quot;kt&quot; style=&quot;font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;randomSelect&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;RANDOM_NUM&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;([yourArray &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;); // picks a random number in range 0 to count&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line&quot; id=&quot;LC948&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1em; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal; line-height: 14px; white-space: normal;&quot;&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line&quot; id=&quot;LC948&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1em; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal; line-height: 14px; white-space: normal;&quot;&gt;&lt;span class=&quot;p&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return randomSelect;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line&quot; id=&quot;LC948&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1em; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: small; font-weight: normal; line-height: 14px; white-space: normal;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line&quot; id=&quot;LC948&quot; style=&quot;font-family: &#39;Bitstream Vera Sans Mono&#39;, Courier, monospace; font-size: 12px; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1em; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;cp&quot; style=&quot;color: #999999; font-weight: bold; line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 11px; font-weight: normal; line-height: 14px; white-space: normal;&quot;&gt;&lt;span class=&quot;p&quot; style=&quot;line-height: 1.4em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;div style=&quot;font-family: &#39;Bitstream Vera Sans Mono&#39;, Courier, monospace; font-size: 12px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/6850642693131352804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/generate-random-number-in-given-range.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/6850642693131352804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/6850642693131352804'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/generate-random-number-in-given-range.html' title='Generate Random Number in a given range'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-5519006823363739190</id><published>2011-01-14T06:34:00.000-08:00</published><updated>2011-01-13T06:46:02.428-08:00</updated><title type='text'>May be useful</title><content type='html'>&lt;h1 class=&quot;entry-title full-title&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;a href=&quot;http://www.simplehelp.net/2008/06/30/how-to-disable-sleep-mode-when-you-close-the-lid-on-your-mac-laptop/&quot; rel=&quot;bookmark&quot; rev=&quot;post-621&quot; title=&quot;Permanent link to How to disable sleep mode when you close the lid on your Mac laptop&quot;&gt;                  &lt;/a&gt;&lt;/h1&gt;&amp;nbsp;How to disable sleep mode when you close the lid on your Mac laptop&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
http://www.simplehelp.net/2008/06/30/how-to-disable-sleep-mode-when-you-close-the-lid-on-your-mac-laptop/ &lt;br /&gt;
&lt;h1 class=&quot;entry-title full-title&quot;&gt;&amp;nbsp;&lt;/h1&gt;</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/5519006823363739190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/may-be-useful.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/5519006823363739190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/5519006823363739190'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/may-be-useful.html' title='May be useful'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-6928169400654621115</id><published>2011-01-13T06:10:00.001-08:00</published><updated>2012-12-16T23:23:44.803-08:00</updated><title type='text'>Add badge value to tab bar item</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Trebuchet MS&#39;, Trebuchet, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Trebuchet MS&#39;, Trebuchet, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot;&gt;&lt;b&gt;It will display on the specific TabItem&#39;s top right corner.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Trebuchet MS&#39;, Trebuchet, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Trebuchet MS&#39;, Trebuchet, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot;&gt;&lt;b&gt;[[self.navigationController tabBarItem] setBadgeValue:@&quot;5&quot;];&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/6928169400654621115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/add-badge-value-to-tab-bar-item.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/6928169400654621115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/6928169400654621115'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/add-badge-value-to-tab-bar-item.html' title='Add badge value to tab bar item'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-2110230674570790734</id><published>2011-01-12T05:25:00.001-08:00</published><updated>2011-01-12T05:25:07.408-08:00</updated><title type='text'>Search Bar with Clear Background</title><content type='html'>&amp;nbsp;&amp;nbsp;&amp;nbsp; UISearchBar* mSearchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0,160,320,40)];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; mSearchBar.showsCancelButton = NO;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; mSearchBar.userInteractionEnabled = YES;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; mSearchBar.backgroundColor = [UIColor clearColor];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; mSearchBar.tintColor = [UIColor whiteColor];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; mSearchBar.showsScopeBar = NO;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.view addSubview:mSearchBar];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (UIView *subview in mSearchBar.subviews)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if ([subview isKindOfClass:NSClassFromString(@&quot;UISearchBarBackground&quot;)]) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [subview removeFromSuperview];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/2110230674570790734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/search-bar-with-clear-background.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/2110230674570790734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/2110230674570790734'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/search-bar-with-clear-background.html' title='Search Bar with Clear Background'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-1225252657554095599</id><published>2011-01-12T04:05:00.000-08:00</published><updated>2011-01-13T06:20:14.833-08:00</updated><title type='text'>How to handle multiple textFileds</title><content type='html'>In Load View,&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; for(int i=0;i&amp;lt;8;i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; UITextField* Field = [[UITextField alloc] initWithFrame:CGRectMake(150,44+35+40*i,160,30)];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Field.borderStyle = UITextBorderStyleRoundedRect;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Field.delegate = self;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Field.tag = i+1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [self.view addSubview:Field];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [mTextFiledsArray addObject:Field];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [Field release];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
Use these Delegate methods,&lt;br /&gt;
&lt;br /&gt;
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [UIView beginAnimations:nil context:nil];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [UIView setAnimationDuration:0.3];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(textField.tag == 5) self.view.frame = CGRectMake(0,-20,320,480);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else if(textField.tag == 7) self.view.frame = CGRectMake(0,-95,320,480);&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else if(textField.tag == 8) self.view.frame = CGRectMake(0,-130,320,480);&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [UIView commitAnimations];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return YES;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
- (BOOL)textFieldShouldReturn:(UITextField *)textField&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int i=0;i&amp;lt;[mTextFiledsArray count];i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; UITextField* tf = [mTextFiledsArray objectAtIndex:i];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(textField == tf)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(i+1 &amp;lt; [mTextFiledsArray count]) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [[mTextFiledsArray objectAtIndex:i+1] becomeFirstResponder];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [UIView beginAnimations:nil context:nil];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [UIView setAnimationDuration:0.3];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; self.view.frame = CGRectMake(0,0,320,480);&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [UIView commitAnimations];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [textField resignFirstResponder];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return YES;&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/1225252657554095599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/how-to-handle-multiple-textfileds.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/1225252657554095599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/1225252657554095599'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/how-to-handle-multiple-textfileds.html' title='How to handle multiple textFileds'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-8626378448337105361</id><published>2011-01-11T08:40:00.000-08:00</published><updated>2011-01-11T08:40:46.281-08:00</updated><title type='text'>Add Custom Title to UINavigationBar</title><content type='html'>&amp;nbsp;&amp;nbsp;&amp;nbsp; UILabel * label = [[[UILabel alloc] initWithFrame:CGRectMake(0,0,45,45)] autorelease];&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;label.textColor = [UIColor grayColor];&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;label.backgroundColor=[UIColor clearColor];&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;label.font = [UIFont boldSystemFontOfSize:20];&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;self.navigationItem.titleView = label;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;label.text=@&quot;Search&quot;; //CUSTOM TITLE&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;[label sizeToFit];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [label release];</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/8626378448337105361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/add-custom-title-to-uinavigationbar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/8626378448337105361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/8626378448337105361'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/add-custom-title-to-uinavigationbar.html' title='Add Custom Title to UINavigationBar'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2106395914766249392.post-8917793065362996742</id><published>2011-01-10T08:54:00.000-08:00</published><updated>2011-01-13T06:19:08.915-08:00</updated><title type='text'>UIApplication Methods</title><content type='html'>&amp;nbsp;&amp;nbsp;&amp;nbsp; [UIApplication sharedApplication].statusBarHidden = NO;&amp;nbsp;&amp;nbsp; // To Hide/Unhide the status bar.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackTranslucent; //To set the Style to status bar.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [UIApplication sharedApplication].statusBarOrientation = UIDeviceOrientationPortrait; //To set the Device Orientation. &lt;br /&gt;
&lt;br /&gt;
We can write&lt;br /&gt;
[UIApplication sharedApplication].statusBarHidden &amp;nbsp; &amp;nbsp; this as &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [[UIApplication sharedApplication] setStatusBarHidden:NO];</content><link rel='replies' type='application/atom+xml' href='http://beginnersiosdev.blogspot.com/feeds/8917793065362996742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/uiapplication-methods.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/8917793065362996742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2106395914766249392/posts/default/8917793065362996742'/><link rel='alternate' type='text/html' href='http://beginnersiosdev.blogspot.com/2011/01/uiapplication-methods.html' title='UIApplication Methods'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04408738578422115065</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>