Wednesday, October 3, 2012

"Pull Down To Refresh" integration for updating data in UITableViews

Hello Guyz , in this section we will be talking about "Pull Down To Refresh" integration for updating your data in UITableView. This kind of effect can be seen in  facebook app, where we  pull down the view and it refreshes/updates the facebook feeds. In the similar way, in this section i will write a bunch of codes that basically do is: when we pull down the UITableView, it will updates its datasource and reload the table section. Here, is the example screen that will help you to understand about this effect more wisely.
download and add this dropdown image to be used in project named updateArrow.png

Tuesday, October 2, 2012

Rate/Review apps in iTuneStore from inside iOS application

Hello Guyz, in this section i will describe you, how we can write a review or rate an app in iTuneStore from inside iOS Application by writing few lines of code. The example i am showing here will directly open up the iTuneStore review section of your app  in your device (to be noted is that the bunch of code i am writing here will only work on actual device.)

-(IBAction) rateAndReviewInItuneStore:(id)sender{
 NSString* url = [NSString stringWithFormat: @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@",AppID];
     [[UIApplication sharedApplication] openURL: [NSURL URLWithString: url ]];

}
Here, AppID = your Apple ID in your iTuneStore , can be found inside your app  in iTuneStore and under "App Infromation" section of your app (9 digit numbers).

"Follow us on Twitter" button integration in iOS Application

Hello Guyz, In this section i will show you the two different way to integrate "Follow us on Twitter" button from inside our iOS App. If you are a twitter user then you probably got what i am talking about. "Follow us" button is very popular in web apps, by integrating it we can directly follow some people or organization depending on the twitter screen name we choose to follow and in this section i will show you how we can integrate it from inside our iOS apps.

Method 1: Without using any API
 Without plugging into native twitter app or  using any other API in code, we could simple open a URL to do the job of Following some one in twitter.
-(IBAction)FollowUsOnTwitter:(id)sender {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://twitter.com/intent/user?screen_name=%@",TwitterAccountName]]];
}
Note : TwitterAccountName = your twitter account name you wish to follow, and it will open to follow that account in the browser.

Method 2: Using Twitter Framework for iOS 5 and later
  To be noted here is that Twitter framework is available  only for  iOS 5 and later version.
- First of all , add "Twitter.framework" and "Accounts.framework" to your project.
- now include #import <Accounts/Accounts.h> and #import <Twitter/Twitter.h> to your .h file.