<?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-5853931987799650748</id><updated>2024-09-14T23:30:52.273-07:00</updated><category term="iPad"/><category term="iOS"/><category term="iPhone"/><category term="Activity in Background"/><category term="Add UISearchBar to UITableViewController"/><category term="Autorotate"/><category term="Backup  from mac system"/><category term="Backup to window server"/><category term="CLLocationSpeed"/><category term="Call Location service when App in background"/><category term="Call method when app in background"/><category term="Close Action Sheet on when Done Button Clicked"/><category term="Cocoapods"/><category term="Device Orientation"/><category term="Device Rotate"/><category term="Device orientation in iOS 6"/><category term="Done Button"/><category term="IMEI"/><category term="Interface Orientation"/><category term="Key String data save"/><category term="Key value data store in iphone"/><category term="KeyboardTypeNumberPad"/><category term="Local data store in iPhone"/><category term="Network Connectivity in iphone"/><category term="No podfile found"/><category term="Paging by Swipe iPhone"/><category term="Paypal in iPad"/><category term="Paypal in iPhone"/><category term="PodFile"/><category term="Read image from document directory"/><category term="Retrieve data from property file"/><category term="Return Button on NumberPad"/><category term="Save file to directory iPhone Save file from URL"/><category term="Save image to document directory iOS"/><category term="Search bar"/><category term="Set time machine backup to networked window system"/><category term="Swipe gesture delegate"/><category term="Task when App in background"/><category term="Time machine without time capsule"/><category term="UDID in iOS"/><category term="UDID in iPhone"/><category term="UIButton"/><category term="UIButton title color"/><category term="UIDevice Method"/><category term="UIPickerView"/><category term="UISwipeGesture"/><category term="UITExtFieldDelegate"/><category term="UIView Swipe effect"/><category term="Unique Identifier"/><category term="WiFi Connectivity in iphone"/><category term="add Swipe to UiView"/><category term="add search bar to header"/><category term="add swipe effect iOS"/><category term="cannot install cocoapods"/><category term="create podfile"/><category term="custom UIButton"/><category term="fetch data from plist"/><category term="fetch data from property file"/><category term="file"/><category term="get TransactionId from Paypal"/><category term="get transaction id in iphone"/><category term="iOS 5"/><category term="iOS device Speed"/><category term="iPad/iPhone moving speed"/><category term="iPhone unique machine id"/><category term="identifierForVendor use"/><category term="install cocoapods"/><category term="locationManager.speed"/><category term="pod initialize"/><category term="retrieve data from plist"/><category term="search bar in table"/><category term="search bar in table ios"/><category term="searching in table"/><category term="smb backup"/><category term="time machine set up"/><category term="title color change"/><title type='text'>iPhoneSol</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5853931987799650748.post-4563972855040142861</id><published>2017-06-26T22:12:00.001-07:00</published><updated>2017-06-27T21:27:22.403-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cannot install cocoapods"/><category scheme="http://www.blogger.com/atom/ns#" term="Cocoapods"/><category scheme="http://www.blogger.com/atom/ns#" term="create podfile"/><category scheme="http://www.blogger.com/atom/ns#" term="install cocoapods"/><category scheme="http://www.blogger.com/atom/ns#" term="No podfile found"/><category scheme="http://www.blogger.com/atom/ns#" term="pod initialize"/><category scheme="http://www.blogger.com/atom/ns#" term="PodFile"/><title type='text'>Install Cocoapods in XCode project</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
To install Cocoapods we have to follow some steps. Here I am explaining one by one&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;First we have to install Cocoapods in running system. To install we have to run &lt;b&gt;&lt;code&gt;sudo gem install CocoaPods&lt;/code&gt;&lt;/b&gt; command on terminal. It will look like following:&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; My-Mac:~ My-mac$ sudo gem install CocoaPods&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; It will take bit time and install all dependencies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Now we need to create pod file. To create pod file we have to run initialize command in project root folder. First we have to move to root folder from terminal. It will be similar like following&lt;/li&gt;
&lt;/ul&gt;
&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; &lt;b&gt;My-Mac:~ My-mac$ cd /Project_Location/Project_Name&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; After this we initialize pod with command. It will be like this&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;My-Mac:~ Project_Name$ pod init&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;As we run above command a new pod file created in root folder of project. You can go from your&amp;nbsp; finder and check.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;After this we need to install pod in root folder. So we run following command&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;My-Mac:~ Project_Name$ pod install&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;This command will fetch all external required dependencies mentioned in pod file. It will generate .xcworkspace file if we don&#39;t have in our root folder. Also it will associate this dependencies with .xcworkspace file of project.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Now we need to close xcode and run project with file name with name of your project and extension will be .xcworkspace.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Please hit like if this is helpful for you.&amp;nbsp;&lt;/b&gt; &lt;/span&gt;&lt;/h3&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/4563972855040142861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2017/06/install-cocoapods-in-xcode-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/4563972855040142861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/4563972855040142861'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2017/06/install-cocoapods-in-xcode-project.html' title='Install Cocoapods in XCode project'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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-5853931987799650748.post-3806278802001373500</id><published>2013-11-28T02:25:00.000-08:00</published><updated>2013-11-28T02:25:40.780-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="file"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="Read image from document directory"/><category scheme="http://www.blogger.com/atom/ns#" term="Save file to directory iPhone Save file from URL"/><category scheme="http://www.blogger.com/atom/ns#" term="Save image to document directory iOS"/><title type='text'>Save and Retrieve file from URL to document directory of iOS</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In this post I am explaining you how you can save any kind of file existing on remote server to your iPhone device default app directory.&lt;br /&gt;
&lt;br /&gt;
I am using an example of image file. I will save that in local directory and then return an object of UIImage that will show at my device.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Method to save file locally&lt;/b&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;-(void)methodToSaveImageFileLocal{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSString *stringPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,&amp;nbsp;&amp;nbsp; NSUserDomainMask, YES)objectAtIndex:0]stringByAppendingPathComponent:@&quot;Content_ Folder&quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // &lt;/b&gt;&lt;b&gt;&lt;b&gt;Content_ Folder&lt;/b&gt; is your folder name&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSError *error = nil;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (![[NSFileManager defaultManager] fileExistsAtPath:stringPath])&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [[NSFileManager defaultManager] createDirectoryAtPath:stringPath&amp;nbsp; withIntermediateDirectories:NO attributes:nil error:&amp;amp;error];&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //This will create a new folder if content folder is not exist&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSString *fileName = [stringPath stringByAppendingFormat:@&quot;/Paddy_dest_1.png&quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSString *str = @&quot;http://demos.nanostuffs.com/Cab/uploads/Paddy_dest_1.png&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; str = [str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@&quot;embed %@&quot;,str);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSData *data = [NSData dataWithContentsOfURL:[NSURL&amp;nbsp; URLWithString:str]];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [data writeToFile:fileName atomically:YES];&lt;br /&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;//Method to Retrieve image file from local&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;-(UIImage *)readFileFromPath{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSString *stringPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)objectAtIndex:0]stringByAppendingPathComponent:@&quot;Content_Folder&quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stringPath&amp;nbsp; = [stringPath stringByAppendingPathComponent:@&quot;Paddy_dest_1.png&quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@&quot;stringpath %@&quot;,stringPath);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return [UIImage imageWithContentsOfFile:stringPath];&lt;br /&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&amp;nbsp; Using these two methods you can directly store and retrieve image from your local directory. You can also save other type of files but you have to change code according that. &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/3806278802001373500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2013/11/save-and-retrieve-file-from-url-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/3806278802001373500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/3806278802001373500'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2013/11/save-and-retrieve-file-from-url-to.html' title='Save and Retrieve file from URL to document directory of iOS'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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-5853931987799650748.post-4258179997290555613</id><published>2013-10-31T06:54:00.000-07:00</published><updated>2013-10-31T06:54:05.076-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="add swipe effect iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="add Swipe to UiView"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="Paging by Swipe iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="Swipe gesture delegate"/><category scheme="http://www.blogger.com/atom/ns#" term="UISwipeGesture"/><category scheme="http://www.blogger.com/atom/ns#" term="UIView Swipe effect"/><title type='text'>Add Swipe Gesture in iOS UIView to add swipe effect in iOS</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Here I am explaining you how we can add swipe gesture to add different effects like move to next, previous, up and down by finger.&lt;br /&gt;
&lt;br /&gt;
Here is the simple code which we have to integrate in our code to get this effect&lt;br /&gt;
&lt;br /&gt;
//Add Swipe Gesture Right&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;UISwipeGestureRecognizer *recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(SwipeRecognizer:)];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; recognizer.direction = UISwipeGestureRecognizerDirectionRight;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; recognizer.numberOfTouchesRequired = 1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; recognizer.delegate = self;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.viewName addGestureRecognizer:recognizer];&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In this we have to add &amp;lt;&lt;b&gt;UIGestureRecognizerDelegate&lt;/b&gt;&amp;gt; in header file.&lt;br /&gt;
&lt;br /&gt;
Here are handling methods for this &lt;br /&gt;
&lt;br /&gt;
//Delegate&lt;br /&gt;
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ([touch.view isKindOfClass:[UIView class]])&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return YES;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return NO;&lt;br /&gt;}&lt;br /&gt;
&lt;br /&gt;
//Method to handle event on swipe&lt;br /&gt;&lt;b&gt;- (void) SwipeRecognizer:(UISwipeGestureRecognizer *)sender {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( sender.direction == UISwipeGestureRecognizerDirectionLeft ){&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@&quot; *** WRITE CODE FOR SWIPE LEFT ***&quot;);&lt;br /&gt;&amp;nbsp;&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; if ( sender.direction == UISwipeGestureRecognizerDirectionRight ){ &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@&quot; *** WRITE CODE FOR SWIPE RIGHT ***&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( sender.direction== UISwipeGestureRecognizerDirectionUp ){ &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; NSLog(@&quot; *** WRITE CODE FOR&amp;nbsp; SWIPE UP ***&quot;);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; if ( sender.direction == UISwipeGestureRecognizerDirectionDown ){&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@&quot; *** SWIPE DOWN ***&quot;);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In this way you can simply add your UISwipeGesture in your app.&lt;br /&gt;
&lt;br /&gt;
For any query and help please mail me any time. Don&#39;t forget to like &lt;complete id=&quot;goog_1624668261&quot;&gt;+1.&lt;/complete&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/4258179997290555613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2013/10/add-swipe-gesture-in-ios-uiview-to-add.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/4258179997290555613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/4258179997290555613'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2013/10/add-swipe-gesture-in-ios-uiview-to-add.html' title='Add Swipe Gesture in iOS UIView to add swipe effect in iOS'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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-5853931987799650748.post-5096479080802053307</id><published>2013-08-26T00:02:00.000-07:00</published><updated>2013-08-26T00:02:43.765-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="identifierForVendor use"/><category scheme="http://www.blogger.com/atom/ns#" term="IMEI"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone unique machine id"/><category scheme="http://www.blogger.com/atom/ns#" term="UDID in iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="UDID in iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="UIDevice Method"/><category scheme="http://www.blogger.com/atom/ns#" term="Unique Identifier"/><title type='text'>UIDevice uniqueIdentifier Deprecated what to do with this now...?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
A method uniqueIdentifier (UIDevice Method) deprecated in iOS 5.0. &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;b&gt;uniqueIdentifier&lt;/b&gt;&lt;br /&gt;
An alphanumeric string unique to each device based on various hardware details. (read-only) (Deprecated in iOS 5.0. Use the &lt;a href=&quot;https://developer.apple.com/library/ios/documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/identifierForVendor&quot;&gt;identifierForVendor&lt;/a&gt; property of this class or the &lt;a href=&quot;https://developer.apple.com/library/ios/documentation/AdSupport/Reference/ASIdentifierManager_Ref/ASIdentifierManager.html#//apple_ref/occ/instp/ASIdentifierManager/advertisingIdentifier&quot;&gt;advertisingIdentifier&lt;/a&gt; property of the &lt;a href=&quot;https://developer.apple.com/library/ios/documentation/AdSupport/Reference/ASIdentifierManager_Ref/ASIdentifierManager.html#//apple_ref/occ/cl/ASIdentifierManager&quot;&gt;ASIdentifierManager&lt;/a&gt; class instead, as appropriate, or use the &lt;a href=&quot;https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSUUID_Class/Reference/Reference.html#//apple_ref/occ/clm/NSUUID/UUID&quot;&gt;UUID&lt;/a&gt; method of the &lt;a href=&quot;https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSUUID_Class/Reference/Reference.html#//apple_ref/occ/cl/NSUUID&quot;&gt;NSUUID&lt;/a&gt; class to create a UUID and write it to the &lt;a href=&quot;http://www.blogger.com/null&quot;&gt;user defaults&lt;/a&gt; database.)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;@property(nonatomic, readonly, retain) NSString *uniqueIdentifier &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Availability&lt;/b&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Available in iOS 2.0 and later.&lt;/li&gt;
&lt;li&gt;Deprecated in iOS 5.0.  &lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;Declared In&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UIDevice.h&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Ref:&lt;/b&gt; &lt;a href=&quot;https://developer.apple.com/library/ios/documentation/uikit/reference/UIDevice_Class/DeprecationAppendix/AppendixADeprecatedAPI.html&quot;&gt;https://developer.apple.com/library/ios/documentation/uikit/reference/UIDevice_Class/DeprecationAppendix/AppendixADeprecatedAPI.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Along with this Apple launches its solutions too. Now you can use separate identifier for your apps. That depends on your app and device. &lt;br /&gt;
&lt;br /&gt;
Now you can use following reference for this&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;identifierForVendor&lt;/b&gt;&lt;br /&gt;
An alphanumeric string that uniquely identifies a device to the app’s vendor. (read-only)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;@property(nonatomic, readonly, retain) &lt;a href=&quot;https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSUUID_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSUUID&quot;&gt;NSUUID&lt;/a&gt; *identifierForVendor&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Discussion&lt;/b&gt;&lt;br /&gt;
The value of this property is the same for apps that come from the same vendor running on the same device. A different value is returned for apps on the same device that come from different vendors, and for apps on different devices regardless of vendor.&lt;br /&gt;
&lt;br /&gt;
The value of this property may be nil if the app is running in the background, before the user has unlocked the device the first time after the device has been restarted. If the value is nil, wait and get the value again later.&lt;br /&gt;
&lt;br /&gt;
The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them. Therefore, if your app stores the value of this property anywhere, you should gracefully handle situations where the identifier changes.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note:&lt;/b&gt; When implementing a system for serving advertisements, use the value in the &lt;a href=&quot;https://developer.apple.com/library/ios/documentation/AdSupport/Reference/ASIdentifierManager_Ref/ASIdentifierManager.html#//apple_ref/occ/instp/ASIdentifierManager/advertisingIdentifier&quot;&gt;advertisingIdentifier&lt;/a&gt; property of the ASIdentifierManager class instead of this property. Use of that property requires you to follow the guidelines set forth in the class discussion for the proper use of that identifier. For more information, see &lt;a href=&quot;https://developer.apple.com/library/ios/documentation/AdSupport/Reference/ASIdentifierManager_Ref/ASIdentifierManager.html#//apple_ref/doc/uid/TP40012654&quot;&gt;ASIdentifierManager Class Reference&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Availability &lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Available in iOS 6.0 and later. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Declared In  &lt;/b&gt;&lt;br /&gt;
UIDevice.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Ref:&lt;/b&gt; &lt;a href=&quot;https://developer.apple.com/library/ios/documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/identifierForVendor&quot;&gt;https://developer.apple.com/library/ios/documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/identifierForVendor&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Now I am telling you how you can get vendor identifier for your apps&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;UIDevice *device = [UIDevice currentDevice];&lt;br /&gt;NSString *strUniqueiIdentity = [[device identifierForVendor] UUIDString];&lt;br /&gt;NSLog(@&quot;strUniqueiIdentity %@&quot;,strUniqueiIdentity); &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this way you can get separate UUID for your application.&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://iphonesoul.blogspot.com/feeds/5096479080802053307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2013/08/uidevice-uniqueidentifier-deprecated.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/5096479080802053307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/5096479080802053307'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2013/08/uidevice-uniqueidentifier-deprecated.html' title='UIDevice uniqueIdentifier Deprecated what to do with this now...?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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-5853931987799650748.post-8808049688616545517</id><published>2013-05-25T00:09:00.002-07:00</published><updated>2013-05-25T00:12:21.353-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="add search bar to header"/><category scheme="http://www.blogger.com/atom/ns#" term="Add UISearchBar to UITableViewController"/><category scheme="http://www.blogger.com/atom/ns#" term="Search bar"/><category scheme="http://www.blogger.com/atom/ns#" term="search bar in table"/><category scheme="http://www.blogger.com/atom/ns#" term="search bar in table ios"/><category scheme="http://www.blogger.com/atom/ns#" term="searching in table"/><title type='text'>Add search bar to UITableViewController</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi guys,&lt;br /&gt;
&lt;br /&gt;
Today we are discussing very important feature of iOS. Sometime we need to add UISearchBar to at the top of UITableViewController.&lt;br /&gt;
&lt;br /&gt;
We can achieve this thing by different ways but best way is to do this by adding this to UITableHeader. In this way we can use table view core feature and delegates to do this.&amp;nbsp; Here I am explaing how we can do this.&lt;br /&gt;
&lt;br /&gt;
Here is the image how your app look at final&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbEJI0XG7CrZkYk5g9fjpzIrOfpheeiIhsVJFZ0Fb0xwC81RI6X57uQiX_-ky0e7u7v5wue-yVuOx8NOmuw7lymSleizfPkRb280yVeo6uqSU7X_leT2fr08VPe7vm1MyYNkmbAGiyM9E/s1600/iOS+Simulator+Screen+shot+25-May-2013+11.46.55+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbEJI0XG7CrZkYk5g9fjpzIrOfpheeiIhsVJFZ0Fb0xwC81RI6X57uQiX_-ky0e7u7v5wue-yVuOx8NOmuw7lymSleizfPkRb280yVeo6uqSU7X_leT2fr08VPe7vm1MyYNkmbAGiyM9E/s400/iOS+Simulator+Screen+shot+25-May-2013+11.46.55+AM.png&quot; width=&quot;266&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here is the code how we can do this. First start with RootViewController.h&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcfVNSUDoQXkoDIGrS7z2yxF-95J2FuDRzWpLqjkImL0wfYA8T5kB-XA0zyL9FQu67Cepte5IedKh47cTHujOFSm9qEgckpy_Qc8xSNpJf23ts8_exPICeF3ciuyznGTHRsz8CX5-bktA/s1600/Screen+shot+2013-05-25+at+12.15.35+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcfVNSUDoQXkoDIGrS7z2yxF-95J2FuDRzWpLqjkImL0wfYA8T5kB-XA0zyL9FQu67Cepte5IedKh47cTHujOFSm9qEgckpy_Qc8xSNpJf23ts8_exPICeF3ciuyznGTHRsz8CX5-bktA/s1600/Screen+shot+2013-05-25+at+12.15.35+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
After this RootViewController.m&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU_5SPQapFoWIvBZHyR190QEIsTLgiO5ZUIudEJBbjJnojuUsOMaBk5LZSkVLenFqRWX95UDAo9N6ytysS34_o27LKsWSGL8fUg1D-SJyOfeN6cvy36KPvzwCMYGx_BjVFZOmzgmADpwY/s1600/Screen+shot+2013-05-25+at+12.15.24+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU_5SPQapFoWIvBZHyR190QEIsTLgiO5ZUIudEJBbjJnojuUsOMaBk5LZSkVLenFqRWX95UDAo9N6ytysS34_o27LKsWSGL8fUg1D-SJyOfeN6cvy36KPvzwCMYGx_BjVFZOmzgmADpwY/s1600/Screen+shot+2013-05-25+at+12.15.24+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
Here we also set some boolean variables which will help us in 
searching. More about this later in the tutorial. The search bar is 
added to the “tableHeaderView” property of the table view. I also have 
another mutable array called “copyListOfItems”, which is used to store 
the search results. It used as the data source of the table view when 
searching. Run your application to see the search bar added to the top 
of the table view. The search bar is also released in the dealloc method
 (source code not provided here).&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: black; font-size: 130%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;How the search will work&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Before we proceed with any code, lets review some things we will do. 
When the user begins searching by clicking the search text box, we will 
do the following:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Set the “searching” variable to YES.&lt;/li&gt;
&lt;li&gt;Set the “letUserSelectRow” variable to NO, since we do not want the 
user to select a row when the search box is empty.&lt;/li&gt;
&lt;li&gt;Disable scrolling of the table view. This is done to avoid an error 
that is raised, when the user scrolls the table view after the search 
bar is clicked.&lt;/li&gt;
&lt;li&gt;Display a done button on the right bar.&lt;/li&gt;
&lt;li&gt;Start searching as the user starts typing, this time allowing the 
user to select a row.&lt;/li&gt;
&lt;li&gt;Use a different data source to bind the table, which display’s the 
search reults.&lt;/li&gt;
&lt;li&gt;Search results are displayed in a single list and they are not 
grouped.&lt;/li&gt;
&lt;li&gt;Hide the keyboard and finish searching, when the user clicks on 
done.&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;color: black; font-size: 130%; font-weight: bold;&quot;&gt;Handling events&lt;/span&gt;&lt;br /&gt;
The first event that gets raised, is when the user touches the search 
bar to bring up the keyboard. The method &lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UISearchBarDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UISearchBarDelegate/searchBarTextDidBeginEditing:&quot; target=&quot;_blank&quot;&gt;searchBarTextDidBeginEditing&lt;/a&gt; is called and this is 
where we set the table view in search mode. The code looks like this&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7j8_P1cHfcjZBEXG0EUFOc3EhECtw9vCY7AfninIiVYu9JejOQ68wBofYWdISUy2cOdY5bSwG4a5kT1ma6rg1tLD1Bbz-VpnwHE-bs50PewYnoz7xhSnFpD5wPQvLUJ73aZp_Kl6RzOs/s1600/Screen+shot+2013-05-25+at+12.18.47+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7j8_P1cHfcjZBEXG0EUFOc3EhECtw9vCY7AfninIiVYu9JejOQ68wBofYWdISUy2cOdY5bSwG4a5kT1ma6rg1tLD1Bbz-VpnwHE-bs50PewYnoz7xhSnFpD5wPQvLUJ73aZp_Kl6RzOs/s1600/Screen+shot+2013-05-25+at+12.18.47+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
Set the “searching” variable to YES, so we know the table view is in 
search mode. The variable “letUserSelectRow” is set to NO, so we can 
prohibit the user from selecting a row. Scrolling of the table view is 
also disabled which will help us when we add a overlay above the view. 
This is done in &lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableViewDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UITableViewDelegate/tableView:willSelectRowAtIndexPath:&quot; target=&quot;_blank&quot;&gt;tableView:willSelectRowAtIndexPath&lt;/a&gt; method and this 
is how the code looks like&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFi0MLGPYkr7iBsytWxhyphenhyphenmVY2LcHb_ZOJc6aQnsPdUsI0r-8cLRk_SboYXP5CsW5qixXbnQlybR4aCmPOPaKbFiI4i5dO41q_Lvk4H91AjWF5kQoLwxh5WxoSNkkil5QzV-RdKAfk10BI/s1600/Screen+shot+2013-05-25+at+12.20.41+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFi0MLGPYkr7iBsytWxhyphenhyphenmVY2LcHb_ZOJc6aQnsPdUsI0r-8cLRk_SboYXP5CsW5qixXbnQlybR4aCmPOPaKbFiI4i5dO41q_Lvk4H91AjWF5kQoLwxh5WxoSNkkil5QzV-RdKAfk10BI/s1600/Screen+shot+2013-05-25+at+12.20.41+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
The above code prevents the user from selecting a row if the variable
 “letUserSelectRow” is set to true.&lt;br /&gt;
The method “doneSearching_Clicked” is called when the user clicks the
 done method. The code for this method is shown later in this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: black; font-size: 130%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Searching the table view&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
The method &lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UISearchBarDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UISearchBarDelegate/searchBar:textDidChange:&quot; target=&quot;_blank&quot;&gt;searchBar:textDidChange&lt;/a&gt; is called when the user 
starts typing in the search field. This is how the search code looks 
like&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ-uWPszpotND4z2psVYUT4CgCZZWdajk38k2Us9hjg9uZ48XdXuTOgQwgGNPN3lY_qXE6Fao43Y9UcjK9ywbcjv-B-sOI5XFYIM-F-mRMTPZox7JjooD05G0uaeaWBIs21NNVRCpSSJw/s1600/Screen+shot+2013-05-25+at+12.27.07+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ-uWPszpotND4z2psVYUT4CgCZZWdajk38k2Us9hjg9uZ48XdXuTOgQwgGNPN3lY_qXE6Fao43Y9UcjK9ywbcjv-B-sOI5XFYIM-F-mRMTPZox7JjooD05G0uaeaWBIs21NNVRCpSSJw/s1600/Screen+shot+2013-05-25+at+12.27.07+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
There is a lot of stuff going on in the code above, so let’s look at 
it line by line&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;We first empty the array, which is used as the data source to the 
table view when searching.&lt;/li&gt;
&lt;li&gt;If the search bar has some text then we continue searching, by 
calling “searchTableView” method. This time we let the user select a row
 to see its detail view.&lt;/li&gt;
&lt;li&gt;The method “searchTableView” is responsible to search the table view
 based on the search text and populate the search results in the array 
“copyListOfItems”.&lt;/li&gt;
&lt;li&gt;If the search bar is empty then, disable scrolling, set the 
searching variable to NO, and prohibit the user from selecting a row.&lt;/li&gt;
&lt;li&gt;At last we refresh the table view.&lt;/li&gt;
&lt;/ol&gt;
Before we jump to understand how the table view is able to display 
the search results, let’s review what happens when the user clicks the 
search button and the “searchTableView” method.&lt;br /&gt;
The method “&lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UISearchBarDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UISearchBarDelegate/searchBarSearchButtonClicked:&quot; target=&quot;_blank&quot;&gt;searchBarSearchButtonClicked&lt;/a&gt;” is called and this is
 how the code looks like, where we simply call “searchTableView” method.&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhS_ue_v2d9NLRqrjQWl5MnTsAwNrVdSD5ZHdRNtovQqLVURRbll2bmzQE7cStgi0w17zNEn-4lr6BChZkleqjii7BYvx_pDOfsI_OJPyQ-WV85Lr7pryOmO5GVfoZ57JkS7u05khgFZY/s1600/Screen+shot+2013-05-25+at+12.28.29+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhS_ue_v2d9NLRqrjQWl5MnTsAwNrVdSD5ZHdRNtovQqLVURRbll2bmzQE7cStgi0w17zNEn-4lr6BChZkleqjii7BYvx_pDOfsI_OJPyQ-WV85Lr7pryOmO5GVfoZ57JkS7u05khgFZY/s1600/Screen+shot+2013-05-25+at+12.28.29+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
Let’s review what goes on in “searchTableView” method. We first 
create a temporary search array, which we will fill it all the objects 
from the original data source. We loop through the dictionary objects, 
and add all the array objects to “searchArray”. We then loop through all
 the items in “searchArray” and compare it with the search text. We add 
the string object to the “copyListOfItems” if we find the search text in
 one of the names.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: black; font-size: 130%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Finish Searching&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
The following method “doneSearching_Clicked” is called when the user 
clicks the done button and this is how the code looks like&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUjTw8NG7v7IuOW5KWnOVxRY9bZqpwlEeNYgZRh5ksOLRBx9rl9OkOpz_8fl0s2ou38XSxgZF1hrUSRijlUS-C-8AoFspvkdB3SnsBCLmObeYk3ZyLnPIGlKwhq6mxkE6TAUpwlQfH0G8/s1600/Screen+shot+2013-05-25+at+12.29.57+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUjTw8NG7v7IuOW5KWnOVxRY9bZqpwlEeNYgZRh5ksOLRBx9rl9OkOpz_8fl0s2ou38XSxgZF1hrUSRijlUS-C-8AoFspvkdB3SnsBCLmObeYk3ZyLnPIGlKwhq6mxkE6TAUpwlQfH0G8/s1600/Screen+shot+2013-05-25+at+12.29.57+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
We hide the keyboard, let the user select a row, set “searching” to 
false and hide the right bar button item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: black; font-size: 130%; font-weight: bold;&quot;&gt;Displaying search results&lt;/span&gt;&lt;br /&gt;
The search results are stored in “copyListOfItems” array and the table 
view is refreshed by calling &lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableView_Class/Reference/Reference.html#//apple_ref/occ/instm/UITableView/reloadData&quot; target=&quot;_blank&quot;&gt;reloadData&lt;/a&gt;. We also set the variable “searching” to
 YES when the user is searching, so we know to display the search 
results. To display results results we have to change few methods. The 
code changes for the following methods “&lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableViewDataSource_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UITableViewDataSource/numberOfSectionsInTableView:&quot; target=&quot;_blank&quot;&gt;numberOfSectionsInTableView&lt;/a&gt;“, “&lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableViewDataSource_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UITableViewDataSource/tableView:numberOfRowsInSection:&quot; target=&quot;_blank&quot;&gt;tableView:numberOfRowsInSection&lt;/a&gt;“, “&lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableViewDataSource_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UITableViewDataSource/tableView:titleForHeaderInSection:&quot; target=&quot;_blank&quot;&gt;tableView:titleForHeaderInSection&lt;/a&gt;“, “&lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableViewDataSource_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UITableViewDataSource/tableView:cellForRowAtIndexPath:&quot; target=&quot;_blank&quot;&gt;tableView:cellForRowAtIndexPath&lt;/a&gt;“, and “&lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableViewDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UITableViewDelegate/tableView:didSelectRowAtIndexPath:&quot; target=&quot;_blank&quot;&gt;tableView:didSelectRowAtIndexPath&lt;/a&gt;“. We have to 
display data from “copyListOfItems” is the variable “searching” is set 
to YES else we display data as before. Let’s look at the code of all 
these methods&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOHVP0UBjANHxAr4R5jc0EoxtpbRk4gMf_5OqYO-31NE7JEsLHMu-AhEZAAk02Mb5nWUQZ1YVgiujb8LYASruboUEnykrNMRS2RF04cx-iS7f5il3lEQ9wCUYzB-i_slKth71MFOQ4eAM/s1600/Screen+shot+2013-05-25+at+12.31.36+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOHVP0UBjANHxAr4R5jc0EoxtpbRk4gMf_5OqYO-31NE7JEsLHMu-AhEZAAk02Mb5nWUQZ1YVgiujb8LYASruboUEnykrNMRS2RF04cx-iS7f5il3lEQ9wCUYzB-i_slKth71MFOQ4eAM/s1600/Screen+shot+2013-05-25+at+12.31.36+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1uvjwfp62H09ujFhwyvrIyMiPgB7pVARx27fMLUxtOgzdqxFqxRzHFYXsONWdW2YqsqeEApIpXQ55T7NPcMC2ptpBnQWQHR39kZWsRYAGhyphenhyphenfY6Dgft6BBPlKltE0IZYr07m3SEmDAbcE/s1600/Screen+shot+2013-05-25+at+12.31.49+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1uvjwfp62H09ujFhwyvrIyMiPgB7pVARx27fMLUxtOgzdqxFqxRzHFYXsONWdW2YqsqeEApIpXQ55T7NPcMC2ptpBnQWQHR39kZWsRYAGhyphenhyphenfY6Dgft6BBPlKltE0IZYr07m3SEmDAbcE/s1600/Screen+shot+2013-05-25+at+12.31.49+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0aP37rTT2sRkz58AmdhHerCgPzx6Jn57L1ChSX3pnz1TMUtyXqwB_rxlKTGkas3RZzTkiVSDPeDqTamy-_VocKinYZ43MvMSDxsHghNX0fHR75jf2y6begwhX1EIV-J7DrrKscSEsLc0/s1600/Screen+shot+2013-05-25+at+12.32.01+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0aP37rTT2sRkz58AmdhHerCgPzx6Jn57L1ChSX3pnz1TMUtyXqwB_rxlKTGkas3RZzTkiVSDPeDqTamy-_VocKinYZ43MvMSDxsHghNX0fHR75jf2y6begwhX1EIV-J7DrrKscSEsLc0/s1600/Screen+shot+2013-05-25+at+12.32.01+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
In “numberOfSectionsInTableView” we return 1 if we are searching 
because the search results are not displayed in sections. In 
tableView:numberOfRowsInSection we return the count of the search 
results array, if we are searching. We return the text “Search Results” 
when searching in tableView:titleForHeaderInSection method. We get the 
data from the search results array when displaying text in 
tableView:cellForRowAtIndexPath method. The same logic is used to get 
the selected name in tableView:didSelectRowAtIndexPath method.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: black; font-size: 130%; font-weight: bold;&quot;&gt;Adding an overlay&lt;/span&gt;&lt;br /&gt;
If you do a search in the contacts application, the table view gets a 
gray overlay above the table view and the search is canceled if the user
 touches the table view. We can do this same, by adding an overlay view 
above the table view.&lt;br /&gt;
Let’s adding another view under resource and name it “OverlayView”. 
Create a view controller called “OverlayViewController” in XCode. Open 
the nib file in IB and set the class of File’s Owner to 
“OverlayViewController” and create all the appropriate connections. Make
 sure that the view is able to respond to touches.&lt;br /&gt;
Now let’s add the overlay above the table view. We do this in 
“searchBarTextDidBeginEditing” and this is how the code looks like&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizKY46gyybkFjOwYR3IVAkL0lwr007yvzph4CmS7bUDzX2f-hljX8kSH1moX66uJrGE0_jW_2HPZRCWQN3FhzY08OShMJi94IZ1vumaN0v6PLHHPcuJ59suDY9TzJZsP_wincwOolZ4lw/s1600/Screen+shot+2013-05-25+at+12.33.56+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizKY46gyybkFjOwYR3IVAkL0lwr007yvzph4CmS7bUDzX2f-hljX8kSH1moX66uJrGE0_jW_2HPZRCWQN3FhzY08OShMJi94IZ1vumaN0v6PLHHPcuJ59suDY9TzJZsP_wincwOolZ4lw/s1600/Screen+shot+2013-05-25+at+12.33.56+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
We have changed the header file “RootViewController.h” to add a 
variable “ovController” of type “OverLayViewController” and the header 
file is added to the top of RootViewController.m file.&lt;br /&gt;
Start by initializing the overlay view controller with the nib name 
“OverlayView”. We perform some calculations to find out where the search
 bar ends, as we want the overlay view to show up below the search bar. 
We set the &lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/instp/UIView/frame&quot; target=&quot;_blank&quot;&gt;frame&lt;/a&gt; of the view which will redraw the view on the
 screen. We set the background color and its transparency. The next line
 of code says that the self is assigned to the “rvController” property. 
The view is inserted above the table view, using insertSubView method.&lt;br /&gt;
We have declared a variable called “rvController” of type 
“RootViewController” in “OverlayViewController”. The reason it is done 
because, we want a reference to the root view controller from the 
overlay controller. This is how the header file and implementation file 
of the “OverlayController” looks like&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEima-6lmkSJqPxqdK6KbQXkLRQKAnlr0jhyeKlPMOO7WLQO-Z2gMQNz16d09Y8pfIMxh-mQSj71U2nN28zVnT-JCw-3Z-t47GLTi4xO2ybs04pry5DGz-xChA7wA5rxbbDJ5gvyIBatCFE/s1600/Screen+shot+2013-05-25+at+12.35.20+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEima-6lmkSJqPxqdK6KbQXkLRQKAnlr0jhyeKlPMOO7WLQO-Z2gMQNz16d09Y8pfIMxh-mQSj71U2nN28zVnT-JCw-3Z-t47GLTi4xO2ybs04pry5DGz-xChA7wA5rxbbDJ5gvyIBatCFE/s1600/Screen+shot+2013-05-25+at+12.35.20+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLjThWAOcQPc8tHhP0TULYa37cGrnAEwqPtl1SgedXmiAMGbfTszxiOSUVVb0f7PsOB9ZVc1_bw4lzVNhQLc_OX6at56xhYCIVyF1SgkIow-8xANWzEV1nSIr19XiSFw3z420783YtPGM/s1600/Screen+shot+2013-05-25+at+12.35.30+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLjThWAOcQPc8tHhP0TULYa37cGrnAEwqPtl1SgedXmiAMGbfTszxiOSUVVb0f7PsOB9ZVc1_bw4lzVNhQLc_OX6at56xhYCIVyF1SgkIow-8xANWzEV1nSIr19XiSFw3z420783YtPGM/s1600/Screen+shot+2013-05-25+at+12.35.30+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
Let’s look at the method &lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIResponder_Class/Reference/Reference.html#//apple_ref/occ/instm/UIResponder/touchesBegan:withEvent:&quot; target=&quot;_blank&quot;&gt;touchesBegan:withEvent&lt;/a&gt; which is called when the 
user touches the overlay view. A call is made to the 
“doneSearching_Clicked” method defined in “RootViewController”. This is 
possible because we have a reference to the root view controller.&lt;br /&gt;
Now that that a overlay shows up when the user clicks the search bar,
 it should be hidden when the user starts searching. The method 
searchBar:textDidChange method now changes accordingly&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimVMjX-IPizkU8Ro5tJC4E_hjGK4ryklREjPMRWUcD72fph_sfmV-io90EDqy_oYRYIh_1kCHB3rkmQV8j0cF2z_lp1nAgnds6UvvsptzjM_DBhuYOKarJggMIpiI9n77TkBrWoWNdJh0/s1600/Screen+shot+2013-05-25+at+12.37.22+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimVMjX-IPizkU8Ro5tJC4E_hjGK4ryklREjPMRWUcD72fph_sfmV-io90EDqy_oYRYIh_1kCHB3rkmQV8j0cF2z_lp1nAgnds6UvvsptzjM_DBhuYOKarJggMIpiI9n77TkBrWoWNdJh0/s1600/Screen+shot+2013-05-25+at+12.37.22+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
We remove the view if the user starts searching and add it back if 
the search bar is empty. The overlay view is removed and released when 
the user clicks the done button. This is how the code for 
“doneSearching_Clicked” is changed&lt;br /&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8tWhhZr5oeI2rWHC8so6YGXFcY6bWBMXAcixRNKl0veKtXSD2D7g1xAMfqstthPoGTJ1_8HBYCHnh_NQp16plguJeZyl_jQWm7enIfZQurA1z8annmbEBnivpt-FPBb0n8ysLxIFx7O0/s1600/Screen+shot+2013-05-25+at+12.38.34+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8tWhhZr5oeI2rWHC8so6YGXFcY6bWBMXAcixRNKl0veKtXSD2D7g1xAMfqstthPoGTJ1_8HBYCHnh_NQp16plguJeZyl_jQWm7enIfZQurA1z8annmbEBnivpt-FPBb0n8ysLxIFx7O0/s1600/Screen+shot+2013-05-25+at+12.38.34+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;pre class=&quot;objc&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
The overlay is removed, released and set to nil. Run the app to see 
the search work.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjasXFkQktf-E1L5tRJyxN_Pe3yyZ4SDgFbbzKYzPZI_4vWT6t3JBgyTw_a0DcG1f8BsEATI964iiXEmdk5t7CzvvY123Tm1eBRX7wjICNmq1z7yoYTKpExaH0kMDPkYN27mcZOm8LIuZg/s1600/iOS+Simulator+Screen+shot+25-May-2013+12.40.29+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjasXFkQktf-E1L5tRJyxN_Pe3yyZ4SDgFbbzKYzPZI_4vWT6t3JBgyTw_a0DcG1f8BsEATI964iiXEmdk5t7CzvvY123Tm1eBRX7wjICNmq1z7yoYTKpExaH0kMDPkYN27mcZOm8LIuZg/s320/iOS+Simulator+Screen+shot+25-May-2013+12.40.29+PM.png&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;wp_syntax&quot;&gt;
&lt;div class=&quot;code&quot;&gt;
Thanks for reading. &amp;nbsp; &lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/8808049688616545517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2013/05/add-search-bar-to-uitableviewcontroller.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/8808049688616545517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/8808049688616545517'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2013/05/add-search-bar-to-uitableviewcontroller.html' title='Add search bar to UITableViewController'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbEJI0XG7CrZkYk5g9fjpzIrOfpheeiIhsVJFZ0Fb0xwC81RI6X57uQiX_-ky0e7u7v5wue-yVuOx8NOmuw7lymSleizfPkRb280yVeo6uqSU7X_leT2fr08VPe7vm1MyYNkmbAGiyM9E/s72-c/iOS+Simulator+Screen+shot+25-May-2013+11.46.55+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5853931987799650748.post-936415685782503</id><published>2013-05-24T22:59:00.000-07:00</published><updated>2013-05-24T22:59:58.962-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Backup  from mac system"/><category scheme="http://www.blogger.com/atom/ns#" term="Backup to window server"/><category scheme="http://www.blogger.com/atom/ns#" term="Set time machine backup to networked window system"/><category scheme="http://www.blogger.com/atom/ns#" term="smb backup"/><category scheme="http://www.blogger.com/atom/ns#" term="time machine set up"/><category scheme="http://www.blogger.com/atom/ns#" term="Time machine without time capsule"/><title type='text'>How to set up time machine backup to windows computer?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Sometime we need to set up time machine backup to our networked window system. We can do it without buying a time capsule. That saves money too.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvm5bDX_7enNGrvu6FsII8k0yDsgXiziAwYgxYphmPW6f3TdBHcmwyFDtxPH8CQa_6jGz_KExIsHY9wGOos6fpZMG7oGxXwQuoL8uIAWiMbhpXEV9A11F2lbfbOkV_msg88J_qj_skQqU/s1600/Screen+shot+2013-05-25+at+9.55.37+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;419&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvm5bDX_7enNGrvu6FsII8k0yDsgXiziAwYgxYphmPW6f3TdBHcmwyFDtxPH8CQa_6jGz_KExIsHY9wGOos6fpZMG7oGxXwQuoL8uIAWiMbhpXEV9A11F2lbfbOkV_msg88J_qj_skQqU/s640/Screen+shot+2013-05-25+at+9.55.37+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Now I am here explaining how we can set time machine backup in a few easy steps.&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Step 1&amp;nbsp;&lt;/b&gt;&lt;/h3&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
First step is create a folder at your shared network computer and connect that folder to Mac system.&amp;nbsp;&lt;/h3&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Guys most important thing about the time machine backup is that it needs only a shared folder where it can write backup. So in this step we will do this. &lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
First, make sure you have sharing turned on on your Windows machine 
(search &quot;advanced sharing settings&quot; in the Windows Start menu), and make
 sure the folder you want to use as your backup is shared. On my Windows
 computer, the shared folder is at&quot;E:\Chandra\Time_Machine\Cp_iMac&quot;.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
When you have finished creating this folder then mount this from your iMac system by pressing CMD+K.&amp;nbsp; Now you can see window opened like following image.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQnLInJQfggHi0aqtCHmcbfQKXgwJnFUiQgTG71fxSm1s37AGyzbXrRkDnxGcoFBsDIJ78QhgJwBCs79uVQGDtgMQvAF-oPdGbvTvrmBaHuG8dghG14Oc0GhQ0cKdYN51LmPqK2KB67gA/s1600/Screen+shot+2013-05-25+at+10.56.54+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;151&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQnLInJQfggHi0aqtCHmcbfQKXgwJnFUiQgTG71fxSm1s37AGyzbXrRkDnxGcoFBsDIJ78QhgJwBCs79uVQGDtgMQvAF-oPdGbvTvrmBaHuG8dghG14Oc0GhQ0cKdYN51LmPqK2KB67gA/s320/Screen+shot+2013-05-25+at+10.56.54+AM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&amp;nbsp;Now add this by pressing + button.&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Step 2&lt;/h3&gt;
&lt;h3 data-textannotation-id=&quot;58b8f1f6fa2cbbaeb928b171fe3bbc9b&quot; style=&quot;text-align: left;&quot;&gt;
Enable Backing Up Time Machine to Unsupported Network Volumes&lt;/h3&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
 &lt;/h3&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Now I want to tell you about Apple&#39;s monopoly. It doesn&#39;t allow others to do with it anything.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Apple disable all unsupported devices by default. So we need to enable this feature before moving further.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
To do this&amp;nbsp; we have to launch terminal app and execute some code.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Here is the code to execute&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;fc961c8764895c1b3b77fc81a75d1a23&quot;&gt;
&lt;b&gt;&lt;code&gt;defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1&lt;/code&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;fc961c8764895c1b3b77fc81a75d1a23&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;fc961c8764895c1b3b77fc81a75d1a23&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Step 3&lt;/h3&gt;
&lt;h3 data-textannotation-id=&quot;58b8f1f6fa2cbbaeb928b171fe3bbc9b&quot; style=&quot;text-align: left;&quot;&gt;
Create dummy backup file to transfer it to backup server.&lt;/h3&gt;
&lt;div data-textannotation-id=&quot;58b8f1f6fa2cbbaeb928b171fe3bbc9b&quot; style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;72b14c9f5896ffb73f9169079ea82939&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpPlXEevPAhUMlpbkj2_PIfHOZab9Lf3qlAL4X4fLzYm5CP01JGNYJp5d2tqn534r0wqJxeCArAE7J-N34RsEBVS8g27jSzrJ2oQaGLtY1LJNWmI2lRW8bdvdXzV0EUNtOdVabbBqEOrg/s1600/ku-medium.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;211&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpPlXEevPAhUMlpbkj2_PIfHOZab9Lf3qlAL4X4fLzYm5CP01JGNYJp5d2tqn534r0wqJxeCArAE7J-N34RsEBVS8g27jSzrJ2oQaGLtY1LJNWmI2lRW8bdvdXzV0EUNtOdVabbBqEOrg/s320/ku-medium.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;Just to 
make sure everything&#39;s working as it should to this point, open Time 
Machine in your System Preferences and click the Select Backup Disk 
button. If you&#39;ve mounted your Windows Time Machine folder, it should 
now show up in the list of potential backup disks. Select it, and click 
Use for Backup.&lt;/div&gt;
&lt;div data-textannotation-id=&quot;72b14c9f5896ffb73f9169079ea82939&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;7a3d62a0c6e3e3487afad2de89fad21f&quot;&gt;
Now try 
backing up to your Windows machine (select Back Up Now from Time Machine
 in your menu bar). If the backup fails at this point, don&#39;t worry—we&#39;re
 expecting that. You need to create a backup file (it&#39;s a sparse bundle)
 first, which will require a little more Terminal work.&lt;/div&gt;
&lt;div data-textannotation-id=&quot;7a3d62a0c6e3e3487afad2de89fad21f&quot;&gt;
&amp;nbsp;So fire up 
Terminal, and paste the following line with a few edits customized to 
your setup:&lt;/div&gt;
&lt;div data-textannotation-id=&quot;7a3d62a0c6e3e3487afad2de89fad21f&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;b&gt;hdiutil create -size 125g -fs HFS+J -volname &quot;TimeMachine&quot; ComputerName_MACADDRESS.sparsebundle&lt;/b&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;6b9be94fa2b9775417130dfde4032fef&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;6b9be94fa2b9775417130dfde4032fef&quot;&gt;
&lt;b&gt;NOTE:&lt;/b&gt; Don&#39;t paste that without editing it.&lt;/div&gt;
&lt;div data-textannotation-id=&quot;d585be89eb96497ea6b6602c9f585843&quot;&gt;
The first 
thing you want to customize is the number 125g—that&#39;s 125GB, which is my
 preferred size for my Time Machine backup. Pick your preferred Time 
Machine backup size.&lt;/div&gt;
&lt;div data-textannotation-id=&quot;6f80f88c84a0b4fda413260e9df9b9e4&quot;&gt;
Next, you can customize the text after -volname to whatever you want. I&#39;ve called it TimeMachine.&lt;/div&gt;
&lt;div data-textannotation-id=&quot;6f80f88c84a0b4fda413260e9df9b9e4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;6f80f88c84a0b4fda413260e9df9b9e4&quot;&gt;
Strip all the colons from the MAC address, add them to the end of your 
computer name (separated by an underscore), and then enter your 
customized command into Terminal. When it&#39;s done, you&#39;ll have a file (in
 your Home directory if that&#39;s where you&#39;re running the Terminal 
commands from) named&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;6f80f88c84a0b4fda413260e9df9b9e4&quot;&gt;
&lt;b&gt;ComputerName_MACADDRESS.sparsebundle&lt;/b&gt;.&lt;/div&gt;
&lt;div data-textannotation-id=&quot;6f80f88c84a0b4fda413260e9df9b9e4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;7800f5ee5e9750dba88c0b5ba8e68144&quot;&gt;
You&#39;re almost done.&lt;/div&gt;
&lt;div data-textannotation-id=&quot;7800f5ee5e9750dba88c0b5ba8e68144&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Step 4 &lt;/h3&gt;
&lt;h3 data-textannotation-id=&quot;45d4e272bb4a9e4a73c408f5173c1a1c&quot; style=&quot;text-align: left;&quot;&gt;
Copy Your Time Machine Backup File to Your Windows Machine&lt;/h3&gt;
&lt;div data-textannotation-id=&quot;45d4e272bb4a9e4a73c408f5173c1a1c&quot; style=&quot;text-align: left;&quot;&gt;
Now you&#39;ve just got to run one more Terminal command to finish up. Again, you&#39;ll want to customize this to fit your setup.&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
cp -R ComputerName_MACADDRESS.sparsebundle /Volumes/TimeMachine&lt;/div&gt;
The 
sparsebundle file should have the same name as the sparsebundle file you
 created above, and the Volume name should be whatever you mounted your 
shared Windows folder as (remember, mine&#39;s called TimeMachine, so it&#39;s&lt;br /&gt;
&lt;br /&gt;
Once you&#39;ve customized that command, enter it into Terminal and hit 
Enter. It will likely take a few minutes for the file to continue 
copying to your Windows machine, but once it has, you&#39;re ready to back 
up! Select Back Up Now from the Time Machine drop-down in your menu bar,
 and if the setup went as planned, your machine should successfully make
 its first Time Machine backup over your network and to your Windows 
machine.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh272dEujcCVE7z6ukH0Jaf15lfeSM14JtXrEOF7RELJecQVCTACA6uS1HIkf9U9LoJYZnmMIh0F6eEYsAYP6ECjSqbIr_RbPzqZ9_i6iwJljnCsGHvquNyIfFOeBD8yws4O7MeMuZ68yQ/s1600/Screen+shot+2013-05-25+at+11.17.29+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;425&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh272dEujcCVE7z6ukH0Jaf15lfeSM14JtXrEOF7RELJecQVCTACA6uS1HIkf9U9LoJYZnmMIh0F6eEYsAYP6ECjSqbIr_RbPzqZ9_i6iwJljnCsGHvquNyIfFOeBD8yws4O7MeMuZ68yQ/s640/Screen+shot+2013-05-25+at+11.17.29+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now whenever Time Machine runs its backups, it&#39;ll look for and 
automatically mount your Windows share, run the backup, and disconnect 
from the share. If you aren&#39;t on your home network, the backup will 
simply delay until you are.&lt;br /&gt;
&lt;div data-textannotation-id=&quot;7800f5ee5e9750dba88c0b5ba8e68144&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;6f80f88c84a0b4fda413260e9df9b9e4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;6f80f88c84a0b4fda413260e9df9b9e4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;6f80f88c84a0b4fda413260e9df9b9e4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;58b8f1f6fa2cbbaeb928b171fe3bbc9b&quot; style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div data-textannotation-id=&quot;fc961c8764895c1b3b77fc81a75d1a23&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;fc961c8764895c1b3b77fc81a75d1a23&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;fc961c8764895c1b3b77fc81a75d1a23&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;fc961c8764895c1b3b77fc81a75d1a23&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div data-textannotation-id=&quot;fc961c8764895c1b3b77fc81a75d1a23&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/936415685782503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2013/05/how-to-set-up-time-machine-backup-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/936415685782503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/936415685782503'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2013/05/how-to-set-up-time-machine-backup-to.html' title='How to set up time machine backup to windows computer?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvm5bDX_7enNGrvu6FsII8k0yDsgXiziAwYgxYphmPW6f3TdBHcmwyFDtxPH8CQa_6jGz_KExIsHY9wGOos6fpZMG7oGxXwQuoL8uIAWiMbhpXEV9A11F2lbfbOkV_msg88J_qj_skQqU/s72-c/Screen+shot+2013-05-25+at+9.55.37+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5853931987799650748.post-7006422170619029410</id><published>2012-12-17T16:55:00.000-08:00</published><updated>2013-01-06T19:20:27.089-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Autorotate"/><category scheme="http://www.blogger.com/atom/ns#" term="Device Orientation"/><category scheme="http://www.blogger.com/atom/ns#" term="Device orientation in iOS 6"/><category scheme="http://www.blogger.com/atom/ns#" term="Device Rotate"/><category scheme="http://www.blogger.com/atom/ns#" term="Interface Orientation"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS 5"/><title type='text'>Device orientation in iOS </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
 
 
 


&lt;br /&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;Supporting
different orientation in app makes the app more user friendly.
Choosing different orientation changes is a simple process in apple
devices. Apple has provided different methods to make it easy. &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;When
listening for orientation changes, the view can respond visually to
the rotation of the device. These notifications will also notify when
the device is screen-side down or screen-side up.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_vqvGX91dFE6q9LelqC1vucc93rzgW0_jONwJ2HiCmk8swLwPBPZ7IVt3-xe6SoBq7QIe3HqyO0XwUbitnboLHK4_sQ7HdcGpsjhExFl3563o-IeRAeDYjstsFKOdseoPIomILknJqjk/s1600/iphone_multi_orientations.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;308&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_vqvGX91dFE6q9LelqC1vucc93rzgW0_jONwJ2HiCmk8swLwPBPZ7IVt3-xe6SoBq7QIe3HqyO0XwUbitnboLHK4_sQ7HdcGpsjhExFl3563o-IeRAeDYjstsFKOdseoPIomILknJqjk/s320/iphone_multi_orientations.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;

 
 
 


&lt;br /&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;Code
to support different orientation changes can be added at the view.
Here we are helping you in this.If you are using iOS 5 or lower you
can easily use the following code to achieve device orientation
functionality.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
 
 
 


&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;u&gt;&lt;b&gt;//For
iOS Version &amp;lt;=5&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;-
(BOOL)shouldAutorotateToInterfaceOrientation(UIInterfaceOrientation)interfaceOrientation&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; &amp;nbsp; [[NSNotificationCenter
defaultCenter]addObserver:self 
selector:@selector(onOrientationChange:)name:UIDeviceOrientationDidChangeNotification
object:nil];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; &amp;nbsp; [[UIDevice
currentDevice] beginGeneratingDeviceOrientationNotifications];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; &amp;nbsp; return
YES;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;/*&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; UIDevice
according to the Apple documentation is “a singleton instance
representing the current device.” Calling the class method
beginGeneratingDeviceOrientationNotifications tells the device to
fire up the accelerometer to start sending out orientation change
notifications. However that one line alone will not respond to the
notifications. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;-(void)onOrientationChange:(NSNotification*)notification
{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; &amp;nbsp; deviceOrientation
=(UIInterfaceOrientation) [UIDevice currentDevice].orientation;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; &amp;nbsp; switch(deviceOrientation)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;    &lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; &amp;nbsp; case
UIInterfaceOrientationLandscapeLeft:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //NSLog(@&quot;landscape
left&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [self
landscapeView];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; case
UIInterfaceOrientationLandscapeRight:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //NSLog(@&quot;landscape right&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [self landscapeView];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; case
UIInterfaceOrientationPortrait:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //NSLog(@&quot;Actual&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [self
portraitView];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; case
UIInterfaceOrientationPortraitUpsideDown:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //NSLog(@&quot;upside
down&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [self
portraitView];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;//Method
for Portrait View&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;-(void)portraitView{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; //Here write your code&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;//Method
for Landscape View&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;-(void)landscapeView{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; //Here
write your code&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626; font-family: HelveticaNeue-Light; line-height: 0.26in;&quot;&gt;If
you are using new latest iOS 6.0 then previous method&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue;&quot;&gt;&lt;b&gt;-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;
deprecated .&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;To support device orientation changes there are new
methods which does this.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;u&gt;&lt;b&gt;//For
iOS 6&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;-
(BOOL)shouldAutorotateOrientation:(UIInterfaceOrientation)interfaceOrientation&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; [[NSNotificationCenter defaultCenter]addObserver:self
selector:@selector(onOrientationChange:)name:UIDeviceOrientationDidChangeNotification
object:nil];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; [[UIDevice
currentDevice] beginGeneratingDeviceOrientationNotifications];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; // Return YES for supported orientations&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; return
YES;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;-(BOOL)shouldAutorotate{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; return
YES;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;-(NSInteger)supportedInterfaceOrientations{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; NSInteger
orientationMask = 0;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; if
([self shouldAutorotateOrientation:
UIInterfaceOrientationLandscapeLeft]){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orientationMask
|= UIInterfaceOrientationMaskLandscapeLeft;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; if
([self shouldAutorotateOrientation:
UIInterfaceOrientationLandscapeRight]){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orientationMask
|= UIInterfaceOrientationMaskLandscapeRight;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; if
([self shouldAutorotateOrientation: UIInterfaceOrientationPortrait]){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orientationMask
|= UIInterfaceOrientationMaskPortrait;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; if
([self shouldAutorotateOrientation:
UIInterfaceOrientationPortraitUpsideDown]){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orientationMask
|= UIInterfaceOrientationMaskPortraitUpsideDown;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; NSLog(@&quot;orientationMask
%d&quot;,orientationMask);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;&amp;nbsp; &amp;nbsp; return
orientationMask;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 0.26in; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #262626;&quot;&gt;&lt;span style=&quot;font-family: HelveticaNeue-Light;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&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&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/7006422170619029410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2012/12/device-orientation-in-ios.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/7006422170619029410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/7006422170619029410'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2012/12/device-orientation-in-ios.html' title='Device orientation in iOS '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_vqvGX91dFE6q9LelqC1vucc93rzgW0_jONwJ2HiCmk8swLwPBPZ7IVt3-xe6SoBq7QIe3HqyO0XwUbitnboLHK4_sQ7HdcGpsjhExFl3563o-IeRAeDYjstsFKOdseoPIomILknJqjk/s72-c/iphone_multi_orientations.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5853931987799650748.post-2553933865132941049</id><published>2012-10-04T06:25:00.000-07:00</published><updated>2012-10-04T06:25:58.290-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fetch data from plist"/><category scheme="http://www.blogger.com/atom/ns#" term="fetch data from property file"/><category scheme="http://www.blogger.com/atom/ns#" term="Key String data save"/><category scheme="http://www.blogger.com/atom/ns#" term="Key value data store in iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="Local data store in iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="retrieve data from plist"/><category scheme="http://www.blogger.com/atom/ns#" term="Retrieve data from property file"/><title type='text'>Retrieve data from Property File</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Property file has .plist extension . This are mostly used to store local data. This is faster than any other way to storing data.&lt;br /&gt;
&lt;br /&gt;
Here are a few lines you can use to fetch data in NSMutableDictionary. In my example I have stored data in following form in a Property file named &lt;b&gt;DBQueries.plist&lt;/b&gt; . Its structure is given below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&quot;1.0&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dict&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;key&amp;gt;Name&amp;lt;/key&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;string&amp;gt;Ram Chandra&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;key&amp;gt;Age&amp;lt;/key&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;string&amp;gt;25&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dict&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now I am telling how you can fetch data in a NSMutableDictionary. I have created a simple method which prints dictionary data.&lt;br /&gt;
-(void)ProcessDataFromPList{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSString *plistPath;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSError *error;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSFileManager *fileManager = [NSFileManager defaultManager];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSString *rootPath = [NSSearchPathForDirectoriesInDomains (NSDocumentDirectory,&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;&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;&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;&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; NSUserDomainMask,&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;&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;&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;&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; YES) objectAtIndex:0];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; plistPath = [rootPath stringByAppendingPathComponent:@&quot;DBQueries.plist&quot;];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //NSLog(@&quot;Plist Path is %@&quot;,plistPath);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; BOOL success = [fileManager fileExistsAtPath:plistPath];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!success) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSString *path = [[NSBundle mainBundle] pathForResource:@&quot;DBQueries&quot; ofType:@&quot;plist&quot;];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; success = [fileManager copyItemAtPath:path toPath:plistPath error:&amp;amp;error];&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; NSMutableDictionary* plistDict = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@&quot;Dictionary Data is&amp;nbsp; %@&quot;,plistDict);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
This will return dictionary which contains data.&lt;br /&gt;
&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://iphonesoul.blogspot.com/feeds/2553933865132941049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2012/10/retrieve-data-from-property-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/2553933865132941049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/2553933865132941049'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2012/10/retrieve-data-from-property-file.html' title='Retrieve data from Property File'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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-5853931987799650748.post-522240722302014312</id><published>2012-07-17T07:33:00.000-07:00</published><updated>2012-07-17T07:33:06.550-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="custom UIButton"/><category scheme="http://www.blogger.com/atom/ns#" term="title color change"/><category scheme="http://www.blogger.com/atom/ns#" term="UIButton"/><category scheme="http://www.blogger.com/atom/ns#" term="UIButton title color"/><title type='text'>Change UIButton Text Color</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;u&gt;&lt;b&gt;Here I want to&amp;nbsp; tell you where UIButton text color. Here is an simple example to do this:&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
Example:&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
UIButton *btnTextColor=[UIButton buttonWithType:UIButtonTypeRoundedRect];&lt;/div&gt;
[btnTextColor addTarget:self action:@selector(myTestMethod) forControlEvents: UIControlEventTouchUpInside];&lt;br /&gt;
&lt;br /&gt;
//Here We are going to change color in following line&lt;br /&gt;
btnTextColor.setTitleColor=[UIColor redColor]; &lt;br /&gt;
&lt;br /&gt;
[btnTextColor setTitle:@&quot;Show my color&quot; forState: UIControlStateNormal];&lt;br /&gt;
btnTextColor.frame=CGRectMake(10,10,200,50);&lt;br /&gt;
[self.view addSubView:btnTextColor];&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/522240722302014312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2012/07/change-uibutton-text-color.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/522240722302014312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/522240722302014312'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2012/07/change-uibutton-text-color.html' title='Change UIButton Text Color'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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-5853931987799650748.post-572823143340561601</id><published>2012-06-12T20:24:00.000-07:00</published><updated>2012-07-11T10:34:44.669-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Done Button"/><category scheme="http://www.blogger.com/atom/ns#" term="KeyboardTypeNumberPad"/><category scheme="http://www.blogger.com/atom/ns#" term="Return Button on NumberPad"/><title type='text'>Add Done Button on Numeric Keyboard</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Here is following code you have to use to add a &lt;b&gt;Done &lt;/b&gt;button on Numeric Keyboard&lt;br /&gt;
&lt;br /&gt;
In .h file you have to add a new Button named Done&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;UIButton *doneButton;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
After this you have to implement following code in implementation file&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-c prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;addButtonToKeyboard &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;com&quot;&gt;// create custom button&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;doneButton &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; nil&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doneButton &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIButton&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; alloc&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; initWithFrame&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;CGRectMake&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;163&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;106&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;53&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;doneButton setHidden&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;NO&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;doneButton addTarget&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;self action&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;@selector&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;doneButtonClicked&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; forControlEvents&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIControlEventTouchUpInside&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;com&quot;&gt;// locate keyboard view&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIWindow&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; tempWindow &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[[[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIApplication&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; sharedApplication&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; windows&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; objectAtIndex&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIView&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; keyboard &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; nil&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; i&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; i&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&amp;lt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;tempWindow&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;subviews count&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; i&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;++)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; keyboard &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;tempWindow&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;subviews objectAtIndex&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;com&quot;&gt;// keyboard found, add the button&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;([[[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;UIDevice&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; currentDevice&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; systemVersion&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; floatValue&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&amp;gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;3.2&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;([[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;keyboard description&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; hasPrefix&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:@&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;&amp;lt;UIPeripheralHost&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; YES&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;keyboard addSubview&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;doneButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;([[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;keyboard description&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; hasPrefix&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:@&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;&amp;lt;UIKeyboard&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; YES&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;keyboard addSubview&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;doneButton&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;doneButtonClicked&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Sender&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;   // Here we&#39;ll write our code to for button action&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/572823143340561601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2012/06/add-done-button-on-numeric-keyboard.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/572823143340561601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/572823143340561601'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2012/06/add-done-button-on-numeric-keyboard.html' title='Add Done Button on Numeric Keyboard'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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-5853931987799650748.post-7915894255525610192</id><published>2012-06-12T18:38:00.000-07:00</published><updated>2012-08-23T22:15:12.765-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Close Action Sheet on when Done Button Clicked"/><category scheme="http://www.blogger.com/atom/ns#" term="UIPickerView"/><category scheme="http://www.blogger.com/atom/ns#" term="UITExtFieldDelegate"/><title type='text'>How to add UIPickerView in UIActionSheet in iPhone or open a UIpicker click on UITextField?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Some time it is required in iPhone to add UIPickerView in UIActionSheet. Here are the steps to do that&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In &lt;u&gt;&lt;b&gt;ViewController.h&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;keyword&quot;&gt;@interface&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;ViewController : UIViewController&amp;lt;UIPickerViewDataSource, UIPickerViewDelegate, UITextFieldDelegate&amp;gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;{&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;keyword&quot;&gt;&amp;nbsp; IBOutlet&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;UITextField *txtText;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;keyword&quot;&gt;NSArray&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;*arrState;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;UIPickerView *pktStatePicker&amp;nbsp;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;}&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
In &lt;b&gt;&lt;u&gt;ViewController.m&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;keyword&quot;&gt;@implementation&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;ViewController&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;- (&lt;/code&gt;&lt;code class=&quot;datatypes&quot;&gt;void&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;)viewDidLoad&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;{&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;&amp;nbsp; [&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;super&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;viewDidLoad];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;&amp;nbsp;arrState= [&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;NSArray&lt;/code&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;code class=&quot;plain&quot;&gt;arrayWithObjects:&lt;/code&gt;&lt;code class=&quot;string&quot;&gt;@&quot;NewYork&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;,&lt;/code&gt;&lt;code class=&quot;string&quot;&gt;@&quot;NewJercy&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;,&lt;/code&gt;&lt;code class=&quot;string&quot;&gt;@&quot;Carlifornia&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;,&lt;/code&gt;&lt;code class=&quot;string&quot;&gt;@&quot;Florida&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;,&lt;/code&gt;&lt;code class=&quot;string&quot;&gt;@&quot;Fremont&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;,&lt;/code&gt;&lt;code class=&quot;string&quot;&gt;@&quot;SantaClara&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;,&lt;/code&gt;&lt;code class=&quot;string&quot;&gt;@&quot;San Diego&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;,&lt;/code&gt;&lt;code class=&quot;string&quot;&gt;@&quot;San Fransisco&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;,&lt;/code&gt;&lt;code class=&quot;string&quot;&gt;@&quot;San Jose&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;nil&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;&amp;nbsp; pktStatePicker = [[UIPickerView alloc] initWithFrame:CGRectZero];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;&amp;nbsp;
pktStatePicker&amp;nbsp;&amp;nbsp;.delegate = &lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;self&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;&amp;nbsp;
pktStatePicker&amp;nbsp;&amp;nbsp;.dataSource = &lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;self&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;[
pktStatePicker&amp;nbsp;&amp;nbsp;setShowsSelectionIndicator:&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;YES&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;txtText.inputView =&amp;nbsp;
pktStatePicker&amp;nbsp;&amp;nbsp;;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;comment&quot;&gt;// Create done button in UIPickerView&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;UIToolbar*&amp;nbsp; mypickerToolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 56)];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;mypickerToolbar.barStyle = UIBarStyleBlackOpaque;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;[mypickerToolbar sizeToFit];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;keyword&quot;&gt;NSMutableArray&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;*barItems = [[&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;NSMutableArray&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;alloc] init];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;UIBarButtonItem *flexSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;self&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;action:&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;nil&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;[barItems addObject:flexSpace];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;UIBarButtonItem *doneBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;self&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;action:&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;@selector&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;(pickerDoneClicked)];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;[barItems addObject:doneBtn];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;&amp;nbsp;[mypickerToolbar setItems:barItems animated:&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;YES&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;&amp;nbsp;txtText.inputAccessoryView = mypickerToolbar;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;}&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;-(&lt;/code&gt;&lt;code class=&quot;datatypes&quot;&gt;void&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;)pickerDoneClicked&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;{&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;keyword&quot;&gt;NSLog&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;(&lt;/code&gt;&lt;code class=&quot;string&quot;&gt;@&quot;Done Clicked&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;);&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;&amp;nbsp;[txtText resignFirstResponder];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;}&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;- (&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;NSInteger&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;)numberOfComponentsInPickerView:(UIPickerView *)pickerView&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;{&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;keyword&quot;&gt;&amp;nbsp;return&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;1;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;}&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;- (&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;NSInteger&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;NSInteger&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;)component&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;{&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;keyword&quot;&gt;&amp;nbsp;return&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;arrState.count;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;}&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;- (&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;NSString&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;*)pickerView:(UIPickerView *)pickerView titleForRow:(&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;NSInteger&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;)row forComponent:(&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;NSInteger&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;)component&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;{&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;keyword&quot;&gt;&amp;nbsp;return&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;[arrState objectAtIndex:row];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;}&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;- (&lt;/code&gt;&lt;code class=&quot;datatypes&quot;&gt;void&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;) pickerView:(UIPickerView *)pickerView didSelectRow:(&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;NSInteger&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;)row inComponent:(&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;NSInteger&lt;/code&gt;&lt;code class=&quot;plain&quot;&gt;)component&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;{&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;&amp;nbsp; txtText.text = (&lt;/code&gt;&lt;code class=&quot;keyword&quot;&gt;NSString&lt;/code&gt; &lt;code class=&quot;plain&quot;&gt;*)[arrState objectAtIndex:row];&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;number&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;plain&quot;&gt;}&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf0IXg8DSksJYcx8PIwYPvlmxBYWA8ZIDxbxih4jmJfOp2U14syaDuZRiNcCdBAls-qQQfWlhRFOUeZPqOoDs0Q-sPZvFLKwGRKKOAXT4JPYxNX2a8x3VLn1mAnmI5Z2pOK7aTylF5PQE/s1600/screen-shot.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf0IXg8DSksJYcx8PIwYPvlmxBYWA8ZIDxbxih4jmJfOp2U14syaDuZRiNcCdBAls-qQQfWlhRFOUeZPqOoDs0Q-sPZvFLKwGRKKOAXT4JPYxNX2a8x3VLn1mAnmI5Z2pOK7aTylF5PQE/s1600/screen-shot.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
Now what to do to close the UIPicker&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;line alt1&quot;&gt;
&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;pickerDoneClicked&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;pktStatePicker dismissWithClickedButtonIndex&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; animated&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;YES&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/7915894255525610192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2012/06/how-to-add-uipickerview-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/7915894255525610192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/7915894255525610192'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2012/06/how-to-add-uipickerview-in.html' title='How to add UIPickerView in UIActionSheet in iPhone or open a UIpicker click on UITextField?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf0IXg8DSksJYcx8PIwYPvlmxBYWA8ZIDxbxih4jmJfOp2U14syaDuZRiNcCdBAls-qQQfWlhRFOUeZPqOoDs0Q-sPZvFLKwGRKKOAXT4JPYxNX2a8x3VLn1mAnmI5Z2pOK7aTylF5PQE/s72-c/screen-shot.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5853931987799650748.post-7128356855996480361</id><published>2012-06-07T11:17:00.000-07:00</published><updated>2012-09-17T08:35:18.650-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CLLocationSpeed"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS device Speed"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad/iPhone moving speed"/><category scheme="http://www.blogger.com/atom/ns#" term="locationManager.speed"/><title type='text'>How to get speed from iOS Device?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
To calculate speed of iOS devices like iPhone/iPad you can use CLLocationManager delegates.&lt;br /&gt;
&lt;br /&gt;
To use this you should to add a few things in you application&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #3d85c6;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Here are steps to measure or calculate speed&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Add CLLocationManagerDelegate in interface file declaration.&lt;/li&gt;
&lt;li&gt;Create CLLocationManager object&lt;/li&gt;
&lt;li&gt;After these what you should use following lines in implementation file&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CLLocationManager *locationManager=[[CLLocationManager alloc]init];&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;location.delegate=self;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [ loactionManager startUpdatingLocation];&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; locationManager.accuracy=...........&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
After these you can use following delegate of CLLocationManager&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;lang-c prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;-(&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;locationManager&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:(&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;CLLocationManager&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;manager didUpdateToLocation&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:(&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;CLLocation&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;newLocation&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-c prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;&amp;nbsp;fromLocation&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:(&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;CLLocation&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;oldLocation&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;//simply get the speed provided by the phone from newLocation&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;double&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; gpsSpeed &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; newLocation&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;speed&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    NSLog(@&quot;Speed of Device is %f&quot;,newLocation.speed); 
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;com&quot;&gt;// alternative manual method&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;oldLocation &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;!=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; nil&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;CLLocationDistance&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; distanceChange &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;newLocation getDistanceFrom&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;oldLocation&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;NSTimeInterval&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; sinceLastUpdate &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;newLocation&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;timestamp&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-c prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;           timeIntervalSinceDate&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;oldLocation&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;timestamp&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;double&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; calculatedSpeed &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; distanceChange &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; sinceLastUpdate&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-c prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-c prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;Above given code work fine when the device travelled a large area.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-c prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-c prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;If you want calculated or measured speed in KPH then you have to multiply the measured speed by 3.6 . &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-c prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-c prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;If you want that speed then multiply that with 2.23693629 for MPH&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/7128356855996480361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2012/06/how-to-get-speed-from-ios-device.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/7128356855996480361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/7128356855996480361'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2012/06/how-to-get-speed-from-ios-device.html' title='How to get speed from iOS Device?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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-5853931987799650748.post-9208959717102118178</id><published>2012-06-06T12:00:00.002-07:00</published><updated>2012-07-11T10:35:29.644-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="get transaction id in iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="get TransactionId from Paypal"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="Paypal in iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="Paypal in iPhone"/><title type='text'>How to get Paypal transaction Id after getting paykey in paypal integration in iphone?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
You can get Transaction Id of your transaction using IPN.&lt;br /&gt;
&lt;br /&gt;
What to do to get it? Here are a few simple steps to do that:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
You should to enable &amp;nbsp;&lt;b&gt;&quot;&lt;/b&gt;&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ENABLE IPN&lt;/b&gt;&lt;span style=&quot;background-color: transparent; border: 0px none; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;Option from PayPal account then all details send by paypal you have received on URL which you given from there&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Here are a few links to help you&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
IPN Overview:&amp;nbsp;&lt;a href=&quot;https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&amp;amp;content_ID=developer/howto_html_instantpaymentnotif&quot; rel=&quot;nofollow&quot; style=&quot;background-color: transparent; border: 0px; color: #4a6b82; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&amp;amp;content_ID=developer/howto_html_instantpaymentnotif&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
IPN Documentation:&amp;nbsp;&lt;a href=&quot;https://cms.paypal.com/cms_content/US/en_US/files/developer/IPNGuide.pdf&quot; rel=&quot;nofollow&quot; style=&quot;background-color: transparent; border: 0px; color: #4a6b82; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;https://cms.paypal.com/cms_content/US/en_US/files/developer/IPNGuide.pdf&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
IPN Variables:&amp;nbsp;&lt;a href=&quot;https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&amp;amp;content_ID=developer/e_howto_html_IPNandPDTVariables&quot; rel=&quot;nofollow&quot; style=&quot;background-color: transparent; border: 0px; color: #4a6b82; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&amp;amp;content_ID=developer/e_howto_html_IPNandPDTVariables&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
IPN Script Example:&amp;nbsp;&lt;a href=&quot;https://cms.paypal.com/us/cgi-bin/?&amp;amp;cmd=_render-content&amp;amp;content_ID=developer/e_howto_admin_IPNImplementation&quot; rel=&quot;nofollow&quot; style=&quot;background-color: transparent; border: 0px; color: #4a6b82; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;https://cms.paypal.com/us/cgi-bin/?&amp;amp;cmd=_render-content&amp;amp;content_ID=developer/e_howto_admin_IPNImplementation&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
IPN Script Generator:&amp;nbsp;&lt;a href=&quot;https://www.paypaltech.com/SG2/&quot; rel=&quot;nofollow&quot; style=&quot;background-color: transparent; border: 0px; color: #4a6b82; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;https://www.paypaltech.com/SG2/&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/9208959717102118178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2012/06/how-to-get-paypal-transaction-id-after.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/9208959717102118178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/9208959717102118178'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2012/06/how-to-get-paypal-transaction-id-after.html' title='How to get Paypal transaction Id after getting paykey in paypal integration in iphone?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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-5853931987799650748.post-3902166582083894131</id><published>2012-06-05T23:22:00.000-07:00</published><updated>2012-07-11T10:36:36.553-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Activity in Background"/><category scheme="http://www.blogger.com/atom/ns#" term="Call Location service when App in background"/><category scheme="http://www.blogger.com/atom/ns#" term="Call method when app in background"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="Task when App in background"/><title type='text'>How to get Latitude and longitude when iOS app in background?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
Sometime it is required to get current location&#39;s latitude and longitude when iOS app in background .&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #d0e0e3;&quot;&gt;
&lt;b&gt;To do that you can use following way&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;First you should to change in info.plist file&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;b&gt; Required Background Modes&lt;/b&gt; (Array) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add array element for &lt;b&gt;App registers for location updates&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Now Second Thing&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; In Appdelegate.m&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; (void)applicationDidEnterBackground:(UIApplication *)application{ &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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [NSTimer scheduledTimerWithTimeInterval:1.0
&lt;br /&gt;
&lt;div class=&quot;de2&quot; style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;de1&quot; style=&quot;text-align: left;&quot;&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; &amp;nbsp; &amp;nbsp;target:self&lt;/div&gt;
&lt;div class=&quot;de2&quot; style=&quot;text-align: left;&quot;&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; &amp;nbsp;selector:@selector(callMethod) userInfo:nil repeats:YES];&lt;/div&gt;
&lt;div class=&quot;de1&quot; style=&quot;text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;de2&quot; style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;de1&quot; style=&quot;text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;-(void)callMethod{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@&quot;This Line prints after every 1 sec when app in background infinite times untill app will be in foreground&quot;); &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/3902166582083894131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2012/06/how-to-get-latitude-and-longitude-when.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/3902166582083894131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/3902166582083894131'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2012/06/how-to-get-latitude-and-longitude-when.html' title='How to get Latitude and longitude when iOS app in background?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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-5853931987799650748.post-5348394100064616303</id><published>2012-06-05T22:21:00.000-07:00</published><updated>2012-07-11T10:36:47.542-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="Network Connectivity in iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="WiFi Connectivity in iphone"/><title type='text'>How to check network connectivity or wifi network in iPhone/iPad/iOS device?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Sometimes it is required to check network connectivity because Apple rejects app when it shows error due to network connectivity.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #76a5af;&quot;&gt;
&lt;b&gt;To resolve this issue you can use these simple steps&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Add following line check in info.plist&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NetworkRequired===&amp;gt;1&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Another method you can use anywhere where you requires to check network&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;pre&gt;- (BOOL) connectedToNetwork
{
 Reachability *r = [Reachability reachabilityWithHostName:@&quot;www.rayzinfotech.com&quot;];
 NetworkStatus internetStatus = [r currentReachabilityStatus];
 BOOL internet;
 if ((internetStatus != ReachableViaWiFi) &amp;amp;&amp;amp; (internetStatus != ReachableViaWWAN)) {
  internet = NO;
 } else {
  internet = YES;
 }
 return internet;
} 

-(BOOL) checkInternet
{
 //Make sure we have internet connectivity
 if([self connectedToNetwork] != YES)
 {
  [self showMessage: @&quot;No network connection found. An Internet connection is required for this application to work&quot;
    withTitle:@&quot;No Network Connectivity!&quot;];
  return NO;
 }
 else {
  return YES;
 }
}&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphonesoul.blogspot.com/feeds/5348394100064616303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonesoul.blogspot.com/2012/06/how-to-check-network-connectivity-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/5348394100064616303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5853931987799650748/posts/default/5348394100064616303'/><link rel='alternate' type='text/html' href='http://iphonesoul.blogspot.com/2012/06/how-to-check-network-connectivity-or.html' title='How to check network connectivity or wifi network in iPhone/iPad/iOS device?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15880386537554597865</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>