Posts

Showing posts from June, 2012

Create an Apple Itunes Account to download apps from App Store

Image
Procedure to register: 1. To create Itunes Account click button to "Create New Account" as shown in Snap1.                            2. Click "Continue" Button as shown in Snap2. 3. Please refer to Snap3:  in second line from top  "If your Billing Address is not ...... click here"   You must click on "here" to select Country as India and continue the remaining steps. 4. Tick the checkbox shown in Snap3 to "I have read and agree to these terms and conditions". 5. Fill in your details shown in Snap4. And hit "Continue" button.   6. Now a window appears showing Snap5. Select payment method as "None". Hit here if Region/ Country is not U.S. and select India and press "Change" button. Now fill in the details below and you are done.

Making the view slide up to make room for the keyboard

In my application i had many UITextFields which covered my whole UIViewController. When i touched my UITextField which was at bottom to enter data, i came to know that the Virtual Keyboard came in front of it and covered it. So i was in a trouble after some help from StackOverflow i resolved the problem. Add a UIScrollview - scrollView to your UIView and set delegates for UITextFields & UIScrollview   - (BOOL)textFieldShouldReturn:(UITextField *)textField   {      if (textField == txtFieldName)    {          [txtFieldCellNo becomeFirstResponder];    }    else if (textField == txtFieldCellNo)    {          [txtFieldEmail becomeFirstResponder];    }    else   {        [textField resignFirstResponder];   } return YES; }  - (void)textFieldDidBeginEditing:(UITextField *)textField  {      if(textfield ==  txtFieldName )        [self animateTextField:txtFieldName up:YES: 80];      else if(textField ==  txtFieldCellNo )         [self animateTextField:  txtFi

Check Wifi & Internet Connectivity in an iPhone APP

I faced a problem in my Application that i would like t discuss here : If wifi is ON but there is no or low internet connectivity, how to resolve it. Below is the sample code : +(void)ApplicationStatus {     bool success = false;     const char *host_name = [@"www.google.com" cStringUsingEncoding:NSASCIIStringEncoding];     SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName (NULL, host_name);     SCNetworkReachabilityFlags flags;     success = SCNetworkReachabilityGetFlags(reachability, &flags);     bool isAvailable = success && (flags & kSCNetworkFlagsReachable) && !(flags & kSCNetworkFlagsConnectionRequired);     if (isAvailable)     {         NSLog(@"Host is reachable: %d", flags);         // Perform Action if Wifi is reachable and Internet Connectivity is present     }     else     {         NSLog(@"Host is unreachable");         // Perform Action if Wifi is reachable and Int

Problem in storing data with Core Data & retrieving it using SQLite

Last week i was working on an application in which i stored my data using CoreData. Afterwards i was told to retrieve data using SQLite queries. I thought it is a simple job since CoreData internally stores whole data into a sqlite file. So i fired my complex queries on database, but i failed. So i tried simple queries thinking of  my queries must be wrong. But no luck, i tried whole day implementing many codes. I checked my Table name, column name and the were correct. I tried everything but was not successful. Finally my senior (Nilesh Jinde) asked me to open my database into SQLieManger & i was totally surprised, CoreData changed every table name of my database with a name prepending a "z", so my table name Contacts changed to ZContacts and so changed my column names in similar manner. And finally i came to know where i was going wrong thanks to Nilesh Jinde. I will advice you all, while working with databases do use a SQLiteManager, it really helps us in expl