<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>iPhone App Dev Help</title>
	<atom:link href="http://ameyashetti.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ameyashetti.wordpress.com</link>
	<description>Solutions to some problemfaced in iPhone devlopment and tutorial.</description>
	<lastBuildDate>Thu, 03 Nov 2011 07:56:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ameyashetti.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/7258debb79af9722fe7dbd21e13e1c69?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>iPhone App Dev Help</title>
		<link>http://ameyashetti.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ameyashetti.wordpress.com/osd.xml" title="iPhone App Dev Help" />
	<atom:link rel='hub' href='http://ameyashetti.wordpress.com/?pushpress=hub'/>
		<item>
		<title>2010 in review</title>
		<link>http://ameyashetti.wordpress.com/2011/01/03/2010-in-review/</link>
		<comments>http://ameyashetti.wordpress.com/2011/01/03/2010-in-review/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 17:25:34 +0000</pubDate>
		<dc:creator>Ameya</dc:creator>
		
		<guid isPermaLink="false">http://ameyashetti.wordpress.com/?p=107</guid>
		<description><![CDATA[The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here&#8217;s a high level summary of its overall blog health: The Blog-Health-o-Meter™ reads This blog is on fire!. Crunchy numbers About 3 million people visit the Taj Mahal every year. This blog was viewed about 28,000 times in 2010. If [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=107&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here&#8217;s a high level summary of its overall blog health:</p>
<p><img style="border:1px solid #ddd;background:#f5f5f5;padding:20px;" src="http://s0.wp.com/i/annual-recap/meter-healthy4.gif" alt="Healthy blog!" width="250" height="183" /></p>
<p>The <em>Blog-Health-o-Meter™</em> reads This blog is on fire!.</p>
<h2>Crunchy numbers</h2>
<p><a href="http://ameyashetti.files.wordpress.com/2009/08/5.jpg"><img style="max-height:230px;float:right;border:1px solid #ddd;background:#fff;margin:0 0 1em 1em;padding:6px;" src="http://ameyashetti.files.wordpress.com/2009/08/5.jpg?w=288" alt="Featured image" /></a></p>
<p>About 3 million people visit the Taj Mahal every year.  This blog was viewed about <strong>28,000</strong> times in 2010.  If it were the Taj Mahal, it would take about 3 days for that many people to see it.</p>
<p>&nbsp;</p>
<p>In 2010, there were <strong>4</strong> new posts, growing the total archive of this blog to 10 posts.</p>
<p>The busiest day of the year was September 28th with <strong>159</strong> views. The most popular post that day was <a style="color:#08c;" href="http://ameyashetti.wordpress.com/2009/07/31/apple-push-notification-service-tutorial/">Apple Push Notification Service Tutorial</a>.</p>
<h2>Where did they come from?</h2>
<p>The top referring sites in 2010 were <strong>iphonedevsdk.com</strong>, <strong>google.co.in</strong>, <strong>davidbits.blogspot.com</strong>, <strong>google.com</strong>, and <strong>cocoachina.com</strong>.</p>
<p>Some visitors came searching, mostly for <strong>iphone push notification tutorial</strong>, <strong>uiview animation tutorial</strong>, <strong>iphone animation tutorial</strong>, <strong>push notification tutorial</strong>, and <strong>iphone view animation</strong>.</p>
<h2>Attractions in 2010</h2>
<p>These are the posts and pages that got the most views in 2010.</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">1</div>
<p><a style="margin-right:10px;" href="http://ameyashetti.wordpress.com/2009/07/31/apple-push-notification-service-tutorial/">Apple Push Notification Service Tutorial</a> <span style="color:#999;font-size:8pt;">July 2009</span><br />
55 comments</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">2</div>
<p><a style="margin-right:10px;" href="http://ameyashetti.wordpress.com/2009/08/17/view-animation-tutorial/">View Animation Tutorial</a> <span style="color:#999;font-size:8pt;">August 2009</span><br />
3 comments</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">3</div>
<p><a style="margin-right:10px;" href="http://ameyashetti.wordpress.com/2009/07/31/iphone-email-validation-for-text-field/">iPhone Email Validation for Text Fieldone</a> <span style="color:#999;font-size:8pt;">July 2009</span><br />
2 comments</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">4</div>
<p><a style="margin-right:10px;" href="http://ameyashetti.wordpress.com/2009/08/18/no-launchable-executable-present-at-path/">No launchable executable present at path</a> <span style="color:#999;font-size:8pt;">August 2009</span></p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">5</div>
<p><a style="margin-right:10px;" href="http://ameyashetti.wordpress.com/2010/06/09/linkedin-api-access-using-google-data-api/">LinkedIn API and Twitter API access using GOOGLE Data API</a> <span style="color:#999;font-size:8pt;">June 2010</span><br />
3 comments</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ameyashetti.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ameyashetti.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ameyashetti.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ameyashetti.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ameyashetti.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ameyashetti.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ameyashetti.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ameyashetti.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ameyashetti.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ameyashetti.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ameyashetti.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ameyashetti.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ameyashetti.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ameyashetti.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=107&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ameyashetti.wordpress.com/2011/01/03/2010-in-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8f90d3750ed1737ad03df1eebf7b0c5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ameyashetti</media:title>
		</media:content>

		<media:content url="http://s0.wp.com/i/annual-recap/meter-healthy4.gif" medium="image">
			<media:title type="html">Healthy blog!</media:title>
		</media:content>

		<media:content url="http://ameyashetti.files.wordpress.com/2009/08/5.jpg?w=288" medium="image">
			<media:title type="html">Featured image</media:title>
		</media:content>
	</item>
		<item>
		<title>Drop Down Custom View For iPhone applications.</title>
		<link>http://ameyashetti.wordpress.com/2010/09/26/drop-down-demo/</link>
		<comments>http://ameyashetti.wordpress.com/2010/09/26/drop-down-demo/#comments</comments>
		<pubDate>Sun, 26 Sep 2010 17:44:43 +0000</pubDate>
		<dc:creator>Ameya</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone App Devlopment]]></category>

		<guid isPermaLink="false">http://ameyashetti.wordpress.com/?p=95</guid>
		<description><![CDATA[Dropdown view like we have in html element, allows user to select one option form list of option.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=95&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Wanted to have a drop-down view like we have in html element, allows user to select one option form list of option.</p>
<p>Have created sample application that demonstrates the use of this custom view.</p>
<p>Sample project available to download at <a href="http://code.google.com/p/dropdowndemo/downloads/list" target="_blank">http://code.google.com/p/dropdowndemo/downloads/list</a>.</p>
<p>Adding instruction how to use view in you application.</p>
<ol>
<li>Import <span style="text-decoration:underline;">QuartzCore.framework</span> in your application.</li>
<li>Import <span style="text-decoration:underline;">DropDownView.h</span> file in the view controller.</li>
<li>Have an class variable dataArray to store data to be put into the table and make a class variable of DropDownView. Making DropDownView variable allows you to control the DropDownView.</li>
<li>Use the DropDownViewDelgate and declare the delegate method in your application.</li>
<li>Initialize the DropdownView variable and add the view in your current view, andy your ready to go.</li>
</ol>
<p>Below a demo sample classes.</p>
<h3>FirstController.h</h3>
<pre>--------------------
#import &lt;UIKit/UIKit.h&gt;

#import "DropDownView.h"

@interface FirstController : UIViewController&lt;DropDownViewDelegate&gt; {

 UIButton *button;

 NSArray *arrayData;

 DropDownView *dropDownView;

}

@property (nonatomic,retain) IBOutlet UIButton *button;

-(IBAction)actionButtonClick;

@end

--------------
</pre>
<h3>FirstController.m</h3>
<pre>-----------
#import "FirstController.h"

@implementation FirstController

@synthesize button;

- (void)viewDidLoad {

 [super viewDidLoad];

 arrayData = [[NSArray alloc] initWithArray:[NSArray arrayWithObjects:@"Test1",@"Test2",nil]];

 dropDownView = [[DropDownView alloc] initWithArrayData:arrayData cellHeight:30 heightTableView:200 paddingTop:-8 paddingLeft:-5 paddingRight:-10 refView:button animation:BLENDIN openAnimationDuration:2 closeAnimationDuration:2];

 dropDownView.delegate = self;

 [self.view addSubview:dropDownView.view];

 [button setTitle:[arrayData objectAtIndex:0] forState:UIControlStateNormal];

}

- (void)didReceiveMemoryWarning {
 [super didReceiveMemoryWarning];
}

- (void)viewDidUnload {
 [super viewDidUnload];

}

- (void)dealloc {

 [button release];

 [super dealloc];

}

#pragma mark -
#pragma mark DropDownViewDelegate

-(void)dropDownCellSelected:(NSInteger)returnIndex{

 [button setTitle:[arrayData objectAtIndex:returnIndex] forState:UIControlStateNormal];

}    

#pragma mark -
#pragma mark Class methods

-(IBAction)actionButtonClick{

 [dropDownView openAnimation];

}    

@end

------------</pre>
<h3>DropDownView.h</h3>
<pre>------------------- #import &lt;UIKit/UIKit.h&gt; typedef enum { BLENDIN, GROW, BOTH } AnimationType; @protocol DropDownViewDelegate @required -(void)dropDownCellSelected:(NSInteger)returnIndex; @end @interface DropDownView : UIViewController&lt;UITableViewDelegate,UITableViewDataSource&gt; { UITableView *uiTableView; NSArray *arrayData; CGFloat heightOfCell; CGFloat paddingLeft; CGFloat paddingRight; CGFloat paddingTop; CGFloat heightTableView; UIView *refView; id&lt;DropDownViewDelegate&gt; delegate; NSInteger animationType; CGFloat open; CGFloat close; } @property (nonatomic,assign) id&lt;DropDownViewDelegate&gt; delegate; @property (nonatomic,retain)UITableView *uiTableView; @property (nonatomic,retain) NSArray *arrayData; @property (nonatomic) CGFloat heightOfCell; @property (nonatomic) CGFloat paddingLeft; @property (nonatomic) CGFloat paddingRight; @property (nonatomic) CGFloat paddingTop; @property (nonatomic) CGFloat heightTableView; @property (nonatomic,retain)UIView *refView; @property (nonatomic) CGFloat open; @property (nonatomic) CGFloat close; - (id)initWithArrayData:(NSArray*)data cellHeight:(CGFloat)cHeight heightTableView:(CGFloat)tHeightTableView paddingTop:(CGFloat)tPaddingTop paddingLeft:(CGFloat)tPaddingLeft paddingRight:(CGFloat)tPaddingRight refView:(UIView*)rView animation:(AnimationType)tAnimation  openAnimationDuration:(CGFloat)openDuration closeAnimationDuration:(CGFloat)closeDuration; -(void)closeAnimation; -(void)openAnimation; @end
----------
</pre>
<h3>DropDownView.m</h3>
<pre>------------
#import "DropDownView.h"

#import &lt;QuartzCore/QuartzCore.h&gt;

@implementation DropDownView

@synthesize uiTableView;

@synthesize arrayData,heightOfCell,refView;

@synthesize paddingLeft,paddingRight,paddingTop;

@synthesize open,close;

@synthesize heightTableView;

@synthesize delegate;

- (id)initWithArrayData:(NSArray*)data cellHeight:(CGFloat)cHeight heightTableView:(CGFloat)tHeightTableView paddingTop:(CGFloat)tPaddingTop paddingLeft:(CGFloat)tPaddingLeft paddingRight:(CGFloat)tPaddingRight refView:(UIView*)rView animation:(AnimationType)tAnimation openAnimationDuration:(CGFloat)openDuration closeAnimationDuration:(CGFloat)closeDuration{

 if ((self = [super init])) {

 self.arrayData = data;

 self.heightOfCell = cHeight;

 self.refView = rView;

 self.paddingTop = tPaddingTop;

 self.paddingLeft = tPaddingLeft;

 self.paddingRight = tPaddingRight;

 self.heightTableView = tHeightTableView;

 self.open = openDuration;

 self.close = closeDuration;

 CGRect refFrame = refView.frame;

 self.view.frame = CGRectMake(refFrame.origin.x-paddingLeft,refFrame.origin.y+refFrame.size.height+paddingTop,refFrame.size.width+paddingRight, heightTableView);

 self.view.layer.shadowColor = [[UIColor blackColor] CGColor];

 self.view.layer.shadowOffset = CGSizeMake(5.0f, 5.0f);

 self.view.layer.shadowOpacity =1.0f;

 self.view.layer.shadowRadius = 5.0f;

 animationType = tAnimation;

 }

 return self;

}    

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {

 [super viewDidLoad];

 CGRect refFrame = refView.frame;

 uiTableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0,refFrame.size.width+paddingRight, (animationType == BOTH || animationType == BLENDIN)?heightTableView:1) style:UITableViewStylePlain];

 uiTableView.dataSource = self;

 uiTableView.delegate = self;

 [self.view addSubview:uiTableView];

 self.view.hidden = YES;

 if(animationType == BOTH || animationType == BLENDIN)
 [self.view setAlpha:1];

}

- (void)didReceiveMemoryWarning {
 [super didReceiveMemoryWarning];
}

- (void)viewDidUnload {
 [super viewDidUnload];

}

- (void)dealloc {
 [super dealloc];
 [uiTableView release];
 [arrayData,refView release];

}

#pragma mark -
#pragma mark UITableViewDelegate

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{

 return heightOfCell;

}    

- (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section{

 return [arrayData count];

}    

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

 static NSString *CellIdentifier = @"Cell";

 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

 if (cell == nil) {

 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];

 }

 cell.textLabel.text = [arrayData objectAtIndex:indexPath.row];

 return cell;

}    

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

 [delegate dropDownCellSelected:indexPath.row];

 [self closeAnimation];

}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{

 return 0;

}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{

 return 0;

}    

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{

 return @"";
}    

- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section{

 return @"";

}    

#pragma mark -
#pragma mark DropDownViewDelegate

-(void)dropDownCellSelected:(NSInteger)returnIndex{

}    

#pragma mark -
#pragma mark Class Methods

-(void)openAnimation{

 self.view.hidden = NO;

 NSValue *contextPoint = [[NSValue valueWithCGPoint:self.view.center] retain];

 [UIView beginAnimations:nil context:contextPoint];

 [UIView setAnimationDuration:open];

 [UIView setAnimationCurve:UIViewAnimationCurveLinear];

 [UIView setAnimationRepeatCount:1];

 [UIView setAnimationDelay:0];

 if(animationType == BOTH || animationType == GROW)
 self.uiTableView.frame = CGRectMake(uiTableView.frame.origin.x,uiTableView.frame.origin.y,uiTableView.frame.size.width, heightTableView);

 if(animationType == BOTH || animationType == BLENDIN)
 self.view.alpha = 1;

 [UIView commitAnimations];

}

-(void)closeAnimation{

 NSValue *contextPoint = [[NSValue valueWithCGPoint:self.view.center] retain];

 [UIView beginAnimations:nil context:contextPoint];

 [UIView setAnimationDuration:close];

 [UIView setAnimationCurve:UIViewAnimationCurveLinear];

 [UIView setAnimationRepeatCount:1];

 [UIView setAnimationDelay:0];

 if(animationType == BOTH || animationType == GROW)
 self.uiTableView.frame = CGRectMake(uiTableView.frame.origin.x,uiTableView.frame.origin.y,uiTableView.frame.size.width, 1);

 if(animationType == BOTH || animationType == BLENDIN)
 self.view.alpha = 0;

 [UIView commitAnimations];

 [self performSelector:@selector(hideView) withObject:nil afterDelay:close];

}

-(void)hideView{

 self.view.hidden = YES;

}     

@end</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ameyashetti.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ameyashetti.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ameyashetti.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ameyashetti.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ameyashetti.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ameyashetti.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ameyashetti.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ameyashetti.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ameyashetti.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ameyashetti.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ameyashetti.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ameyashetti.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ameyashetti.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ameyashetti.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=95&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ameyashetti.wordpress.com/2010/09/26/drop-down-demo/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8f90d3750ed1737ad03df1eebf7b0c5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ameyashetti</media:title>
		</media:content>
	</item>
		<item>
		<title>LinkedIn API and Twitter API access using GOOGLE Data API</title>
		<link>http://ameyashetti.wordpress.com/2010/06/09/linkedin-api-access-using-google-data-api/</link>
		<comments>http://ameyashetti.wordpress.com/2010/06/09/linkedin-api-access-using-google-data-api/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 06:24:53 +0000</pubDate>
		<dc:creator>Ameya</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone App Devlopment]]></category>

		<guid isPermaLink="false">http://ameyashetti.wordpress.com/?p=90</guid>
		<description><![CDATA[Simply download the the sample from http://code.google.com/p/gdata-objectivec-client/

For Working with Linkedin API

Replace twitter 

keys as below

NSString *myConsumerKey = @"XXXXXXXXX"; //NEED TO ENTER YOUR CONSUMER 
KEY FROM LINKEDIN API 

NSString *myConsumerSecret = @"XXXXXX"; //NEED TO ENTER YOUR CONSUMER 
SECRET FROM LINKEDIN API

I accept that you have a consumer secrete and key. Else get it by registering your application at https://www.linkedin.com/secure/developer   

and replace the URL set as below

NSURL *requestURL = [NSURL URLWithString:@" 
https://api.linkedin.com/uas/oauth/requestToken"]; 
NSURL *authorizeURL = [NSURL URLWithString:@" 
https://api.linkedin.com/uas/oauth/authorize"]; 
NSURL *accessURL = [NSURL URLWithString:@" 
https://api.linkedin.com/uas/oauth/accessToken"]; 
NSString *scope = nil;

do not forget to replace this with your reverse domain name as

static NSString *const kAppServiceName = @"com.YOURDOMAIN.OAuthSampleTouch";
static NSString *const kShouldSaveInKeychainKey = @"shouldSaveInKeychain";
 

Run your application, click twiter tab and singin.

You should get a web view where you can login and the application pops back to return the oauth token.

For Working with Twitter API
-Create your application at https://twitter.com/apps
-Application Type: Browser not client ( if is a client application
 then will prompt for a pin which is used in the application to
 authenticate.).
-Website: provide some web site.
-Use Twitter for login: check mark Yes, use Twitter for login.
-Callback URL:    http://www.google.com/OAuthCallback<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=90&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>LinkedIn API access using Google Data Api</strong></p>
<p>Was facing problem linkedin API access using a suitable oauth client framework for iPhone.</p>
<p>The problem was there was no proper solution for this.</p>
<p>I had already come accross Google data API and their touch sample code available at http://code.google.com/p/gdata-objectivec-client/. which I was tring to access gmail for mails, but seems they have not opened that yet, although they provide access to Contact api.</p>
<p>Struggling to find an api access to linked in from iPhone stumbled upon this thread http://developer.linkedin.com/thread/1447 which redirected me to this http://developer.linkedin.com/thread/1169. Here you will find a lot of comments and sample application created by &#8220;Scott&#8221; and if u mail him you will get the source.</p>
<p>But still I was not satisfied as I wanted to use  MPOAuthMobile for iPhone for a unified access to twitter and linkedin.</p>
<p>So here is the simple and elegant solution using  Google Data API , (you can trust google so I prefer it as a solution).</p>
<p>Simply download the the sample from http://code.google.com/p/gdata-objectivec-client/</p>
<p>Replace twitter</p>
<p>keys as below</p>
<p>NSString *myConsumerKey = @&#8221;XXXXXXXXX&#8221;; //NEED TO ENTER YOUR CONSUMER<br />
KEY FROM LINKEDIN API</p>
<p>NSString *myConsumerSecret = @&#8221;XXXXXX&#8221;; //NEED TO ENTER YOUR CONSUMER<br />
SECRET FROM LINKEDIN API</p>
<p>I accept that you have a consumer secrete and key. Else get it by registering your application at https://www.linkedin.com/secure/developer</p>
<p>and replace the URL set as below</p>
<p>NSURL *requestURL = [NSURL URLWithString:@"<br />
https://api.linkedin.com/uas/oauth/requestToken"];<br />
NSURL *authorizeURL = [NSURL URLWithString:@"<br />
https://api.linkedin.com/uas/oauth/authorize"];<br />
NSURL *accessURL = [NSURL URLWithString:@"<br />
https://api.linkedin.com/uas/oauth/accessToken"];<br />
NSString *scope = nil;</p>
<p>do not forget to replace this with your reverse domain name as</p>
<p>static NSString *const kAppServiceName = @&#8221;com.YOURDOMAIN.OAuthSampleTouch&#8221;;<br />
static NSString *const kShouldSaveInKeychainKey = @&#8221;shouldSaveInKeychain&#8221;;</p>
<p>Run your application, click twiter tab and singin.</p>
<p>You should get a web view where you can login and the application pops back to return the oauth token.</p>
<p>This is where I got the solution</p>
<p>http://groups.google.com/group/gdata-objectivec-client/browse_thread/thread/d876c078b677334/5981e36d77c2151f?lnk=gst&#038;q=Can+we+use+OAuth+Sample+provided+in+google+data+api+to+work+with+LinkedIn+Api#5981e36d77c2151f</p>
<p><strong>Twitter API access using Google Data API</strong></p>
<p>The application provided google should simply work simply you have take care of the following points.</p>
<p>Create your application at https://twitter.com/apps</p>
<ul>
<li>Application Type: Browser not client ( if is a client application<br />
then will prompt for a pin which is used in the application to<br />
authenticate.).</li>
<li>Website: provide some web site.</li>
<li>Use Twitter for login: check mark Yes, use Twitter for login.</li>
<li>Callback URL:    http://www.google.com/OAuthCallback</li>
</ul>
<p><strong> </strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ameyashetti.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ameyashetti.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ameyashetti.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ameyashetti.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ameyashetti.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ameyashetti.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ameyashetti.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ameyashetti.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ameyashetti.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ameyashetti.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ameyashetti.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ameyashetti.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ameyashetti.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ameyashetti.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=90&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ameyashetti.wordpress.com/2010/06/09/linkedin-api-access-using-google-data-api/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8f90d3750ed1737ad03df1eebf7b0c5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ameyashetti</media:title>
		</media:content>
	</item>
		<item>
		<title>Twitter with JSON and fetching id from NSDictionary</title>
		<link>http://ameyashetti.wordpress.com/2010/04/17/twitter-with-json-and-fetching-id-from-nsdictionary/</link>
		<comments>http://ameyashetti.wordpress.com/2010/04/17/twitter-with-json-and-fetching-id-from-nsdictionary/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 21:01:50 +0000</pubDate>
		<dc:creator>Ameya</dc:creator>
				<category><![CDATA[1]]></category>
		<category><![CDATA[garbeld integer]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[NSDictionary]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://ameyashetti.wordpress.com/?p=85</guid>
		<description><![CDATA[Was working with twitter API to get tweets in to iPhone. Found another silly issue , which solved with great effort. Was using some kind of JSON parser ,(will put the name later) , to fetch tweets. every thing was running fine until I wanted to store the latest tweet&#8217;s status_id. Here I ran into [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=85&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Was working with twitter API to get tweets in to iPhone. Found another silly issue , which solved with great effort.</p>
<p>Was using some kind of JSON parser ,(will put the name later) , to fetch tweets. every thing was running fine until I wanted to store the latest tweet&#8217;s status_id. Here I ran into serious trouble. I was using integer in the database and keeping the tweet_status _id as my tuple (table row) identity. The problem I faced here was all other things converted well like the user id , tweet text etc. when tried to convert status_id would find some garbled entry , really strange. After long unsuccessful efforts in converting twitter status id in to integer , I finally noticed that the size of the number was very big. Bingo the solution was not far just need to convert NSString to double value. So I thought of some fixed approach to deal with twitter data.</p>
<ol>
<li>Better not store the converted form of twitter data in the database, for data like status ids, I store it as char or text. Convert it to its true form only when required to compare , like need to store the max status tweet id by comparing with rest tweets id.</li>
<li>Never keep twitter status as  identity in your table. Remember in iPhone your using SQLite db.</li>
<li>The only two fields can cause serious problem in future in the application are tweet&#8217;s status id and tweet&#8217;s status&#8217;s user id. Better keep them as text and handle them as  double. the use id fit as a integer now , but soon will be out of integer scoop.</li>
</ol>
<p>This post I have put up to show some light to developers goggling for the problem I faced. Please comment to impove this post and, I will include the points it the main post itself.</p>
<ol></ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ameyashetti.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ameyashetti.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ameyashetti.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ameyashetti.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ameyashetti.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ameyashetti.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ameyashetti.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ameyashetti.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ameyashetti.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ameyashetti.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ameyashetti.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ameyashetti.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ameyashetti.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ameyashetti.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=85&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ameyashetti.wordpress.com/2010/04/17/twitter-with-json-and-fetching-id-from-nsdictionary/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8f90d3750ed1737ad03df1eebf7b0c5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ameyashetti</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLite Abort due to constraint violation</title>
		<link>http://ameyashetti.wordpress.com/2010/04/17/sqlite-abort-due-to-constraint-violation/</link>
		<comments>http://ameyashetti.wordpress.com/2010/04/17/sqlite-abort-due-to-constraint-violation/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 07:33:16 +0000</pubDate>
		<dc:creator>Ameya</dc:creator>
				<category><![CDATA[iPhone App Devlopment]]></category>
		<category><![CDATA[19]]></category>
		<category><![CDATA[abort]]></category>
		<category><![CDATA[Abort due to constraint violation]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[violation]]></category>

		<guid isPermaLink="false">http://ameyashetti.wordpress.com/?p=82</guid>
		<description><![CDATA[Getting problem with SQLite , database record not getting inserted although no error.
The sqlite retun message is 19 (SQLITE_CONSTRAINT) 
This is due to the NOT NULL and other constrains applied to table while creating it.
Drop table and re create without constrains.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=82&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When working with SQLite connections with iPhone , encounter a strange problem.</p>
<ul>
<li>Records where not getting inserted into database .</li>
<li>Existing records could not be updated.</li>
<li>The log and NSAssertion showed now error.</li>
</ul>
<p>Tried to debug and found that the SQLite message after committing to db was 19 (SQLITE_CONSTRAINT) , this did not convey much information. Drilled down the SQLite static for the message and found &#8220;Abort due to constraint violation&#8221; for meaage 19. Googled but could not find much of help out there, and my project was stranded. While checking every thing from scratch found that thee where condition enforced on the column of table NOT NULL, like  id was PRIMAY KEY AUTO INCREMENT NOT NULL. This was the cause of the issue , as I wanted the SQLite to generate id for me but also had said you require an id field for an insertion to complete. The same problem was with some other column.</p>
<p>So I decided to keep some guideline for dealing with SQLite and iPhone connections.</p>
<ol>
<li>Never create primary key column of table with both the restrictions ON (TUE) , that is  AUTO INCREMENT NOT NULL. This rule can ignored, if you want to manage your own primary key creation.</li>
<li>Never create column of table with restrictions NOT NULL, unless you are absolutely sure you will always have a value for the column. This rule can be ignored if you are managing NULL value entries in UI input fields from SQLite connection. No one uses this approach, of checking NULL from SQL, as every one wants to check input from the view in the controller itself.  So this rule must not be broken.</li>
<li>When dealing with sqlite3_step() don&#8217;t depend on SQLITE_ERROR        (1)   ( SQL error or missing database ) to catch error with your SQL statements. Better look for  SQLITE_DONE        (101)  ( has finished executing successfully), rest everything is an error, even constrain violation.</li>
</ol>
<p>My post may look silly, for an expert but even an expert makes a silly mistake. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ameyashetti.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ameyashetti.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ameyashetti.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ameyashetti.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ameyashetti.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ameyashetti.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ameyashetti.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ameyashetti.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ameyashetti.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ameyashetti.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ameyashetti.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ameyashetti.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ameyashetti.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ameyashetti.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=82&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ameyashetti.wordpress.com/2010/04/17/sqlite-abort-due-to-constraint-violation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8f90d3750ed1737ad03df1eebf7b0c5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ameyashetti</media:title>
		</media:content>
	</item>
		<item>
		<title>No launchable executable present at path</title>
		<link>http://ameyashetti.wordpress.com/2009/08/18/no-launchable-executable-present-at-path/</link>
		<comments>http://ameyashetti.wordpress.com/2009/08/18/no-launchable-executable-present-at-path/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 05:22:47 +0000</pubDate>
		<dc:creator>Ameya</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone App Devlopment]]></category>

		<guid isPermaLink="false">http://ameyashetti.wordpress.com/?p=69</guid>
		<description><![CDATA[I was having problem &#8221; No launchable executable present at path &#8221; when migrating from 2.2.1 sdk to 3.0 sdk. Althoug the application had 0 error and 0 warning the state continued. I got this problem solved by following these 2 steps. Close all instance and main xcode application. Go to application folder of concern [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=69&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was having problem &#8221; No launchable executable present at path &#8221; when migrating from 2.2.1 sdk to 3.0 sdk. Althoug the application had 0 error and 0 warning the state continued. I got this problem solved by following these 2 steps.</p>
<ul>
<li>Close all instance and main xcode application.</li>
<li>Go to application folder of concern and simply delete the build folder and click the xcode executable in your application folder to start.</li>
</ul>
<p>This should solve your problem.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ameyashetti.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ameyashetti.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ameyashetti.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ameyashetti.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ameyashetti.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ameyashetti.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ameyashetti.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ameyashetti.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ameyashetti.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ameyashetti.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ameyashetti.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ameyashetti.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ameyashetti.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ameyashetti.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=69&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ameyashetti.wordpress.com/2009/08/18/no-launchable-executable-present-at-path/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8f90d3750ed1737ad03df1eebf7b0c5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ameyashetti</media:title>
		</media:content>
	</item>
		<item>
		<title>View Animation Tutorial</title>
		<link>http://ameyashetti.wordpress.com/2009/08/17/view-animation-tutorial/</link>
		<comments>http://ameyashetti.wordpress.com/2009/08/17/view-animation-tutorial/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 04:24:20 +0000</pubDate>
		<dc:creator>Ameya</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone App Devlopment]]></category>

		<guid isPermaLink="false">http://ameyashetti.wordpress.com/?p=49</guid>
		<description><![CDATA[Lets start by taking a simple view based application. Open the view controller class file of the application and you will find an commented method &#8221; -(void)viewDidLoad&#8221; copy past the following line of code in the scope of the method. [super viewDidLoad]; /* Simple Viewable red rectrangle */ UIView *view = [[UIView alloc] initWithFrame:CGRectMake(100,100,100,50)]; view.backgroundColor [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=49&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<p style="margin-bottom:0;" align="LEFT"><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">Lets start by taking a simple view based application.</span></span></span></p>
<p style="margin-bottom:0;" align="LEFT"><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">Open the view controller class file of the application and you will find an commented method &#8221; </span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">-(</span></span></span><span style="color:#aa0d91;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">void</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">)viewDidLoad&#8221; </span></span></span><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">copy past the following line of code in the scope of the method.</span></span></span></p>
<p style="margin-bottom:0;" align="LEFT">
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#000000;"> <span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">[</span></span></span><span style="color:#aa0d91;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">super</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;"> </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">viewDidLoad</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">];</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT">
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#007400;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">/* Simple Viewable red rectrangle */</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#5c2699;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">UIView</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;"> *view = [[</span></span></span><span style="color:#5c2699;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">UIView</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;"> </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">alloc</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">] </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">initWithFrame</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">:</span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">CGRectMake</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">(</span></span></span><span style="color:#1c00cf;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">100</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">,</span></span></span><span style="color:#1c00cf;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">100</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">,</span></span></span><span style="color:#1c00cf;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">100</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">,</span></span></span><span style="color:#1c00cf;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">50</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">)];</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">view.backgroundColor = [</span></span></span><span style="color:#5c2699;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">UIColor</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;"> </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">redColor</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">];</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">[</span></span></span><span style="color:#aa0d91;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">self</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">.view </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">addSubview</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">:view];</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT">
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#007400;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">/* Create simple animation */</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#007400;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">//Create context for animation</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#5c2699;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">NSValue</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;"> *contextPoint = [[</span></span></span><span style="color:#5c2699;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">NSValue</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;"> </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">valueWithCGPoint</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">:view.</span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">center</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">] </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">retain</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">];</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">[</span></span></span><span style="color:#5c2699;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">UIView</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;"> </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">beginAnimations</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">:</span></span></span><span style="color:#aa0d91;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">nil</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;"> </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">context</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">:contextPoint];</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT">
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#007400;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">//Animation duration in float</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">[</span></span></span><span style="color:#5c2699;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">UIView</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;"> </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">setAnimationDuration</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">:</span></span></span><span style="color:#1c00cf;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">5</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">];</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT">
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#007400;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">//Animation process curve</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">[</span></span></span><span style="color:#5c2699;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">UIView</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;"> </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">setAnimationCurve</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">:</span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">UIViewAnimationCurveEaseInOut</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">];</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT">
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#007400;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">//Animation repeate</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">[</span></span></span><span style="color:#5c2699;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">UIView</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;"> </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">setAnimationRepeatCount</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">:</span></span></span><span style="color:#1c00cf;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">1</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">];</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT">
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#007400;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">//Animation start after delay</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">[</span></span></span><span style="color:#5c2699;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">UIView</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;"> </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">setAnimationDelay</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">:</span></span></span><span style="color:#1c00cf;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">1</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">];</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT">
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#007400;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">//Apply transformations in combination to the view</span></span></span></p>
<p style="padding-left:30px;">view.transform =  CGAffineTransformConcat(</p>
<p style="padding-left:210px;">CGAffineTransformConcat(</p>
<p style="padding-left:240px;">CGAffineTransformConcat(</p>
<p style="padding-left:270px;">CGAffineTransformMakeTranslation(-12,0),CGAffineTransformMakeScale(3,3)),</p>
<p style="padding-left:240px;">CGAffineTransformMakeRotation(3.14)),</p>
<p style="padding-left:210px;">CGAffineTransformMake(1,2,3,4,5,6));</p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">[</span></span></span><span style="color:#5c2699;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">UIView</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;"> </span></span></span><span style="color:#2e0d6e;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">commitAnimations</span></span></span><span style="color:#000000;"><span style="font-family:Monaco,monospace;"><span style="font-size:x-small;">];</span></span></span></p>
<p style="margin-bottom:0;" align="LEFT">
<ul>
<li><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">The above comments for the pice of code are self explanatory.</span></span></span></li>
<li><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">Lines 5 to 7 help to create simple res rectangle and adds as a sub-view of the current view.</span></span></span></li>
<li><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">Now for animation we have to create an canvas which is called our context. The context is created with the line 11 and 12.</span></span></span></li>
<li><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">Now we have to tell what the animation should be like. </span></span></span></li>
<li><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">Line 5 states that the entire animation will be completed in 5 seconds. The input is fraction hence takes in 5.5 etc also.</span></span></span></li>
<li><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">Line 18 states the animation curve, that is what speed the animation should proceed. The variant of the values are. </span></span></span></li>
</ul>
<p><strong><span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">UIViewAnimationCurveEaseInOut</span></span></span></strong><br />
<span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">An ease-in ease-out curve causes the animation begins slowly, accelerate through the middle of its</span></span></span><br />
<span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">duration, and then slow again before completing.</span></span></span><br />
<span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">Available in iPhone OS 2.0 and later.</span></span></span><br />
<span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">Declared in </span></span></span><span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">UIView.h</span></span></span><span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">.</span></span></span><br />
<strong><span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">UIViewAnimationCurveEaseIn</span></span></span></strong><br />
<span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">An ease-in curve causes the animation to begin slowly, and then speed up as it progresses.</span></span></span><br />
<span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">Available in iPhone OS 2.0 and later.</span></span></span><br />
<span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">Declared in </span></span></span><span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">UIView.h</span></span></span><span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">.</span></span></span><br />
<strong><span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">UIViewAnimationCurveEaseOut</span></span></span></strong><br />
<span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">An ease-out curve causes the animation to begin quickly, and then slow as it completes.</span></span></span><br />
<span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">Available in iPhone OS 2.0 and later.</span></span></span><br />
<span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">Declared in </span></span></span><span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">UIView.h</span></span></span><span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">.</span></span></span><br />
<strong><span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">UIViewAnimationCurveLinear</span></span></span></strong><br />
<span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">A linear animation curve causes an animation to occur evenly over its duration.</span></span></span><br />
<span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">Available in iPhone OS 2.0 and later.</span></span></span><br />
<span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">Declared in </span></span></span><span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">UIView.h</span></span></span><span style="color:#000000;"><span style="font-family:Courier,monospace;"><span style="font-size:x-small;">.</span></span></span></p>
<ul>
<li><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">Line 21 states how many repetation of the animation are required. Takes fraction input but not 0 to denote infinite loops, but we have to specify the number of loop. try changing the value to 1.5 in your application. The animation will run once full then a half.</span></span></span></li>
<li><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">Line 24 states the delay after which the animation should start.</span></span></span></li>
<li><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">Line 27 is the core of the animation process. The various transformations that should be animated. This step consists of 4 transformations all concatenation into one transformation.</span></span></span></li>
<li><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">There are basic 4 transforms<br />
</span></span></span></p>
<ul>
<li>CGAffineTransformMakeTranslation(-12,0) This statement states that your context will move to left by 12 px and 0 up or down.</li>
<li>CGAffineTransformMakeScale(3,3) Will multiply the width and height by 3 and 3 respectively.</li>
<li>CGAffineTransformMakeRotation(3.14) Will rotate the context by (pi) 3.14 . You can rotate from 0(0) to 180 ((pi) 3.14) degress repectively (clock wize for positive and anti clock wise for negative.).</li>
<li>CGAffineTransformMake(1,2,3,4,5,6) This statement directly works on the animation matrix. For more information on this.   ref <a title="Wiki on matrixs" href="http://en.wikipedia.org/wiki/Transformation_matrix">wiki</a> and <a title="iPhone ref manuals" href="http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CGAffineTransform/Reference/reference.html#//apple_ref/c/func/CGAffineTransformMake">iPhone docs</a>.</li>
</ul>
<p>The last statement actually starts the animation.</li>
<li>This is a small picture to animate small rectangle the complete view can be animated transformational similarly.</li>
</ul>
<p><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;">
<a href='http://ameyashetti.wordpress.com/2009/08/17/view-animation-tutorial/attachment/1/' title='1'><img width="100" height="150" src="http://ameyashetti.files.wordpress.com/2009/08/1.jpg?w=100&#038;h=150" class="attachment-thumbnail" alt="1" title="1" /></a>
<a href='http://ameyashetti.wordpress.com/2009/08/17/view-animation-tutorial/attachment/2/' title='2'><img width="99" height="150" src="http://ameyashetti.files.wordpress.com/2009/08/2.jpg?w=99&#038;h=150" class="attachment-thumbnail" alt="2" title="2" /></a>
<a href='http://ameyashetti.wordpress.com/2009/08/17/view-animation-tutorial/attachment/3/' title='3'><img width="99" height="150" src="http://ameyashetti.files.wordpress.com/2009/08/3.jpg?w=99&#038;h=150" class="attachment-thumbnail" alt="3" title="3" /></a>
<a href='http://ameyashetti.wordpress.com/2009/08/17/view-animation-tutorial/attachment/4/' title='4'><img width="100" height="150" src="http://ameyashetti.files.wordpress.com/2009/08/4.jpg?w=100&#038;h=150" class="attachment-thumbnail" alt="4" title="4" /></a>
<a href='http://ameyashetti.wordpress.com/2009/08/17/view-animation-tutorial/attachment/5/' title='5'><img width="100" height="150" src="http://ameyashetti.files.wordpress.com/2009/08/5.jpg?w=100&#038;h=150" class="attachment-thumbnail" alt="5" title="5" /></a>
<br />
</span></span></span></p>
<p style="margin-left:1.27cm;text-indent:-1.27cm;margin-bottom:0;" align="LEFT"><span style="color:#000000;"><span style="font-family:Helvetica,sans-serif;"><span style="font-size:small;"><br />
</span></span></span></p>
<p style="margin-bottom:0;">
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ameyashetti.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ameyashetti.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ameyashetti.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ameyashetti.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ameyashetti.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ameyashetti.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ameyashetti.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ameyashetti.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ameyashetti.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ameyashetti.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ameyashetti.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ameyashetti.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ameyashetti.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ameyashetti.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=49&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ameyashetti.wordpress.com/2009/08/17/view-animation-tutorial/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8f90d3750ed1737ad03df1eebf7b0c5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ameyashetti</media:title>
		</media:content>

		<media:content url="http://ameyashetti.files.wordpress.com/2009/08/1.jpg?w=100" medium="image">
			<media:title type="html">1</media:title>
		</media:content>

		<media:content url="http://ameyashetti.files.wordpress.com/2009/08/2.jpg?w=99" medium="image">
			<media:title type="html">2</media:title>
		</media:content>

		<media:content url="http://ameyashetti.files.wordpress.com/2009/08/3.jpg?w=99" medium="image">
			<media:title type="html">3</media:title>
		</media:content>

		<media:content url="http://ameyashetti.files.wordpress.com/2009/08/4.jpg?w=100" medium="image">
			<media:title type="html">4</media:title>
		</media:content>

		<media:content url="http://ameyashetti.files.wordpress.com/2009/08/5.jpg?w=100" medium="image">
			<media:title type="html">5</media:title>
		</media:content>
	</item>
		<item>
		<title>NSDictionary objectAtKey returns (null)?</title>
		<link>http://ameyashetti.wordpress.com/2009/07/31/objetive-c-detect-empty-null-entry-in-nsdictionary/</link>
		<comments>http://ameyashetti.wordpress.com/2009/07/31/objetive-c-detect-empty-null-entry-in-nsdictionary/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 09:28:41 +0000</pubDate>
		<dc:creator>Ameya</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[NSDictionary NSNull]]></category>
		<category><![CDATA[NSDictionary null]]></category>
		<category><![CDATA[NSNull]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://ameyashetti.wordpress.com/?p=11</guid>
		<description><![CDATA[Objetive C Detect empty / null entry in NSDictionary?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=11&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">A small work around for problem faced with NSDictionary null return problem.</p>
<p style="text-align:left;">In cases like</p>
<p style="text-align:left;"><span style="font-family:courier new;">NSString *myImageURL = [user objectForKey:@"imageURL"];</span></p>
<p style="text-align:left;">where <span style="font-weight:bold;">[user objectForKey:@"imageURL"] </span>may return <span style="font-weight:bold;">NSNull</span> object.</p>
<p style="text-align:left;">This makes <span style="font-weight:bold;">myImageURL</span> a <span style="font-weight:bold;">NSNull</span> object hence cannot be compared using conventional comparisons. An NSNull is an invalid memory allocation or an error.:)</p>
<p style="text-align:left;">Two alternative solutions are</p>
<p style="text-align:left;"><span style="font-family:courier new;">if ((NSNull *)[user objectForKey:@"imageURL"] == [NSNull null]) { }</span></p>
<p style="text-align:left;">and to convert to string if the above does not works.</p>
<p style="text-align:left;"><span style="font-family:courier new;">NSString *myImageURL = [NSString stringWithFormat:@"%@",[user objectForKey:@"imageURL"]];</span></p>
<p style="text-align:left;">this can be compared by</p>
<p style="text-align:left;"><span style="font-family:courier new;">if([imgURL isEqualToString:@"</span><span style="font-family:courier new;">"]){</span><br />
<span style="font-family:courier new;">}</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ameyashetti.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ameyashetti.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ameyashetti.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ameyashetti.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ameyashetti.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ameyashetti.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ameyashetti.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ameyashetti.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ameyashetti.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ameyashetti.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ameyashetti.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ameyashetti.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ameyashetti.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ameyashetti.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=11&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ameyashetti.wordpress.com/2009/07/31/objetive-c-detect-empty-null-entry-in-nsdictionary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8f90d3750ed1737ad03df1eebf7b0c5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ameyashetti</media:title>
		</media:content>
	</item>
		<item>
		<title>iPhone Email Validation for Text Fieldone</title>
		<link>http://ameyashetti.wordpress.com/2009/07/31/iphone-email-validation-for-text-field/</link>
		<comments>http://ameyashetti.wordpress.com/2009/07/31/iphone-email-validation-for-text-field/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 09:27:06 +0000</pubDate>
		<dc:creator>Ameya</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone App Devlopment]]></category>
		<category><![CDATA[iPhone Email Validation]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://ameyashetti.wordpress.com/?p=9</guid>
		<description><![CDATA[Email validation function for iPhone<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=9&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">Searched a lot for email validation for iPhone did not find any , hence was forced to create an validation method of my own.</p>
<p style="text-align:left;">Found an sample as below.</p>
<pre style="font-family:monospace;text-align:left;">
<a style="color:#33ffff;" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span>NSString</span></a> <span>*</span><span style="color:#000099;">mystring</span> <span>=</span> <span style="color:#ff0000;">@</span><span style="color:#ff0000;">"Hello World!"</span>;
<a style="color:#66ffff;" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span>NSString</span></a> <span>*</span><span style="color:#000099;">regex</span> <span>=</span> <span style="color:#ff0000;">@</span><span style="color:#ff0000;">".*l{2,}.*"</span>;
<a style="color:#66ffff;" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSPredicate_Class/"><span>NSPredicate</span></a> <span>*</span><span style="color:#000099;">regextest</span> <span>=</span> <span>[</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSPredicate_Class/"><span>NSPredicate</span></a>
                         <span style="color:#000099;">predicateWithFormat</span><span style="color:#000099;">:</span><span style="color:#ff0000;">@</span><span style="color:#ff0000;">"SELF MATCHES %@"</span>, <span style="color:#000099;">regex</span><span>]</span>;
<span style="color:#33cc00;">if</span><span style="color:#33cc00;"> </span><span style="color:#33cc00;">(</span><span>[</span><span style="color:#000099;">regextest evaluateWithObject</span><span style="color:#000099;">:</span><span style="color:#000099;">mystring</span><span>]</span> <span>==</span> <span style="color:#33cc00;">YES</span><span style="color:#33cc00;">)</span><span style="color:#33cc00;"> </span><span style="color:#33cc00;">{</span>
    <span style="color:#000099;">NSLog</span><span style="color:#000099;">(</span><span>@</span><span>"Match!"</span><span>)</span>;
<span>}</span> <span>else</span> <span>{</span>
    <span style="color:#000099;">NSLog</span><span>(</span><span>@</span><span>"No match!"</span><span>)</span>;
<span>}</span>

The above code will not work as NSPredicate is not available for iPhone framework.
Also found an sample that had the following code as below.

<a href="http://hi.baidu.com/myguru/blog/item/f211d7959c21f343d1135ee8.html" target="_blank">RegexKitLite Objective-C ÕýÔò±í´ïÊ¾_Ð¡Ð¡µÄÌ«Ñô</a><a href="http://hi.baidu.com/myguru/blog/item/f211d7959c21f343d1135ee8.html"> </a></pre>
<p>NSString *email=@&#8221;asd@fgh.com&#8221;;<br />
NSString *strEmailMatchstring=@&#8221;\\b([a-zA-Z0-9%_.+\\-]+)@([a-zA-Z0-9.\\-]+?\\.[a-zA-Z]{2,6})\\b&#8221;;<br />
if(![email isMatchedByRegex:strEmailMatchstring]){</p>
<blockquote><p>NSLog(@&#8221;Invalid email address found&#8221;);<br />
objAlert = [[UIAlertView alloc] initWithTitle:@&#8221;Error!&#8221; message:</p></blockquote>
<blockquote><p>@&#8221;Enter a valid e-mail address&#8221; delegate:nil cancelButtonTitle:nil otherButtonTitles:@&#8221;Try Again&#8221;,nil];<br />
[objAlert show];[objAlert release];</p></blockquote>
<p>}</p>
<pre style="font-family:monospace;text-align:left;"><span style="font-weight:bold;"> </span>
Found Regex download , which is available at http://downloads.sourceforge.net/regexkit/RegexKitLite-3.0.tar.bz2

* To include the RegexKitLite.h and RegexKitLite.m file in you project.

* In project setting search "other" at Other Linker Flags put the word "-licucore".

* Import header in the view controller where it will be used.

Modify the above method to as follows.
 -(BOOL)emailValidate:(NSString *)email{
 NSString *strEmailMatchstring=@"\\b([a-zA-Z0-9%_.+\\-]+)@([a-zA-Z0-9.\\-]+?\\.[a-zA-Z]{2,6})\\b";
 if([email isMatchedByRegex:strEmailMatchstring])
 return YES;
 else
 return NO;
 }</pre>
<p style="text-align:left;">Created an method of my own hope this would help people searching for such validation methods.</p>
<p style="text-align:left;">-<span style="font-family:courier new;font-size:85%;">(<span style="color:#ff0000;">BOOL</span>)<span style="color:#000000;">emailValidate</span> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> <span style="color:#3333ff;">NSString</span> *)<span style="color:#000000;">email</span>{</span></p>
<p style="text-align:left;"><span style="color:#33cc00;">//Based on the string below</span><br />
<span style="color:#33cc00;"> //NSString *strEmailMatchstring=@&#8221;\\b([a-zA-Z0-9%_.+\\-]+)@([a-zA-Z0-9.\\-]+?\\.[a-zA-Z]{2,6})\\b&#8221;;</span></p>
<p style="text-align:left;"><span style="color:#33cc00;">//Quick return if @ Or . not in the string</span><br />
<span style="color:#cc33cc;">if</span>([email <span style="color:#000099;">rangeOfString</span>:@"@"].<span style="color:#3333ff;">location</span>==NSNotFound || [email <span style="color:#3333ff;">rangeOfString</span>:@"."].<span style="color:#000099;">location</span>==NSNotFound)<br />
<span style="color:#cc33cc;">return NO;</span></p>
<p style="text-align:left;"><span style="color:#33cc00;">//Break email address into its components</span><br />
NSString *accountName=[email <span style="color:#000099;">substringToIndex</span>: [email <span style="color:#3333ff;">rangeOfString</span>:@"@"].location];<br />
email=[email <span style="color:#000099;">substringFromIndex</span>:[email <span style="color:#000099;">rangeOfString</span>:@"@"].<span style="color:#000099;">location</span>+1];</p>
<p style="text-align:left;"><span style="color:#33cc00;">//&#8217;.&#8217; not present in substring</span><br />
<span style="color:#cc33cc;">if</span>([email <span style="color:#000099;">rangeOfString</span>:@"."].<span style="color:#000099;">location</span>==NSNotFound)<br />
<span style="color:#cc33cc;">return NO;</span><br />
NSString *domainName=[email <span style="color:#3333ff;">substringToIndex</span>:[email <span style="color:#000099;">rangeOfString</span>:@"."].<span style="color:#000099;">location</span>];<br />
NSString *subDomain=[email <span style="color:#000099;">substringFromIndex</span>:[email <span style="color:#000099;">rangeOfString</span>:@"."].location+1];</p>
<p style="text-align:left;"><span style="color:#33cc00;">//username, domainname and subdomain name should not contain the following charters below</span><br />
<span style="color:#33cc00;"> //filter for user name</span><br />
NSString *unWantedInUName = @&#8221; ~!@#$^&amp;*()={}[]|;&#8217;:\&#8221;&lt;&gt;,?/`&#8221;;<br />
<span style="color:#33cc00;">//filter for domain</span><br />
NSString *unWantedInDomain = @&#8221; ~!@#$%^&amp;*()={}[]|;&#8217;:\&#8221;&lt;&gt;,+?/`&#8221;;<br />
<span style="color:#33cc00;"> //filter for subdomain </span><br />
NSString *unWantedInSub = @&#8221; `~!@#$%^&amp;*()={}[]:\&#8221;;&#8217;&lt;&gt;,?/1234567890&#8243;;</p>
<p style="text-align:left;"><span style="color:#33cc00;">//subdomain should not be less that 2 and not greater 6</span><br />
<span style="color:#cc66cc;">if</span>(!(subDomain.length&gt;=2 &amp;&amp; subDomain.length&lt;=6))         <span style="color:#cc33cc;">return NO;</span></p>
<p style="text-align:left;"><span style="color:#cc66cc;">if</span>([accountName <span style="color:#000099;">isEqualToString</span>:@""] || [accountName <span style="color:#000099;">rangeOfCharacterFromSet</span>:[NSCharacterSet <span style="color:#000099;">characterSetWithCharactersInString</span>:unWantedInUName]].<span style="color:#000099;">location</span>!=NSNotFound || [domainName <span style="color:#000099;">isEqualToString</span>:@""] || [domainName <span style="color:#000099;">rangeOfCharacterFromSet</span>:[NSCharacterSet <span style="color:#000099;">characterSetWithCharactersInString</span>:unWantedInDomain]].<span style="color:#000099;">location</span>!=NSNotFound || [subDomain isEqualToString:@""] || [subDomain rangeOfCharacterFromSet:[NSCharacterSet <span style="color:#3333ff;">characterSetWithCharactersInString</span>:unWantedInSub]].<span style="color:#000099;">location</span>!=NSNotFound)<br />
<span style="color:#cc33cc;">return NO;</span></p>
<p style="text-align:left;"><span style="color:#cc66cc;">return YES;</span><br />
}</p>
<p style="text-align:left;">
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ameyashetti.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ameyashetti.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ameyashetti.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ameyashetti.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ameyashetti.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ameyashetti.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ameyashetti.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ameyashetti.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ameyashetti.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ameyashetti.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ameyashetti.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ameyashetti.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ameyashetti.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ameyashetti.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=9&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ameyashetti.wordpress.com/2009/07/31/iphone-email-validation-for-text-field/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8f90d3750ed1737ad03df1eebf7b0c5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ameyashetti</media:title>
		</media:content>
	</item>
		<item>
		<title>NSASCIIStringEncoding breaks</title>
		<link>http://ameyashetti.wordpress.com/2009/07/31/mailto-problem-string-stringbyaddingpercentescapesusingencodingnsasciistringencoding-return-null/</link>
		<comments>http://ameyashetti.wordpress.com/2009/07/31/mailto-problem-string-stringbyaddingpercentescapesusingencodingnsasciistringencoding-return-null/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 09:25:43 +0000</pubDate>
		<dc:creator>Ameya</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[NSASCIIStringEncoding]]></category>
		<category><![CDATA[NSASCIIStringEncoding breaks]]></category>
		<category><![CDATA[NSASCIIStringEncoding returns null]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://ameyashetti.wordpress.com/?p=7</guid>
		<description><![CDATA[Dealing with ASCII encoding breaking problem<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=7&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">It is possible that [subject stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding], may return null, if subject contains ASCII charter out side 0 to 127.</p>
<p style="text-align:left;"><span style="font-size:85%;"><span style="font-family:courier new;"><span style="color:#3333ff;"><span><span>NSString</span></span></span><span> *<span>mailString</span> = [<span>NSString</span> </span><span style="color:#3333ff;">stringWithFormat</span><span>:@"<span>mailto</span> <img src='http://s1.wp.com/wp-includes/images/smilies/icon_confused.gif' alt=':?' class='wp-smiley' /> to=%@&amp;subject=%@&amp;body=%@",</span></span><br />
<span style="font-family:courier new;"> [to <span style="color:#3333ff;">stringByAddingPercentEscapesUsingEncoding</span>:<span style="color:#3366ff;">NSASCIIStringEncoding</span>],</span><br />
<span style="font-family:courier new;"> [subject <span style="color:#3333ff;">stringByAddingPercentEscapesUsingEncoding</span>:<span style="color:#3366ff;">NSASCIIStringEncoding</span>],</span><br />
<span style="font-family:courier new;"> [body  <span style="color:#3333ff;">stringByAddingPercentEscapesUsingEncoding</span>:<span style="color:#3366ff;">NSASCIIStringEncoding</span>]];</span></span></p>
<p style="text-align:left;"><span style="font-size:85%;"><span style="font-family:courier new;">[[<span style="color:#3333ff;"><span><span>UIApplication</span></span></span> <span style="color:#3333ff;"><span><span>sharedApplication</span></span></span>] <span style="color:#3333ff;"><span><span>openURL</span></span></span>:[<span style="color:#3333ff;"><span><span>NSURL</span></span></span> <span style="color:#000099;">URLWithString</span><span>:<span>mailString</span>]];</span></span></span></p>
<p style="text-align:left;"><span style="font-family:lucida grande;font-size:85%;"><br />
</span><span style="font-size:85%;"><span style="font-family:courier new;"><span style="font-family:lucida grande;"><span style="font-family:lucida grande;"> </span></span></span></span></p>
<p style="text-align:left;"><span style="font-family:lucida grande;">To stop this we can use an simple filter like.</span><br />
-(<span style="color:#000099;"><span><span>NSString</span></span></span><span> *)<span>replaceLatin</span> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> <span>NSString</span> *)string{</span></p>
<p style="text-align:left;"><span style="color:#3366ff;">return</span> [[[[[[[[[[[[string <span style="color:#3333ff;">stringByReplacingOccurrencesOfString</span><span>:@"–" <span>withString</span>:@""] </span><span style="color:#3333ff;">stringByReplacingOccurrencesOfString</span>:@&#8221;—&#8221; <span style="color:#3333ff;"><span><span>withString</span></span></span>:@&#8221;"] <span style="color:#000099;">stringByReplacingOccurrencesOfString</span><span>:@&#8221;¡&#8221; <span>withString</span>:@&#8221;"] </span><span style="color:#3333ff;">stringByReplacingOccurrencesOfString</span>:@&#8221;¿&#8221; <span style="color:#3333ff;"><span><span>withString</span></span></span>:@&#8221;"] <span style="color:#3333ff;">stringByReplacingOccurrencesOfString</span>:@&#8221;”&#8221; <span style="color:#3366ff;"><span><span>withString</span></span></span>:@&#8221;"] <span style="color:#3333ff;">stringByReplacingOccurrencesOfString</span><span>:@&#8221;“&#8221; <span>withString</span>:@&#8221;"] </span><span style="color:#3333ff;">stringByReplacingOccurrencesOfString</span>:@&#8221;\&#8221;" <span style="color:#3333ff;"><span><span>withString</span></span></span>:@&#8221;"] <span style="color:#3333ff;">stringByReplacingOccurrencesOfString</span>:@&#8221;‘&#8221; <span style="color:#3333ff;"><span><span>withString</span></span></span>:@&#8221;"] <span style="color:#3333ff;">stringByReplacingOccurrencesOfString</span><span>:@&#8221;’&#8221; <span>withString</span>:@&#8221;"] </span><span style="color:#3333ff;">stringByReplacingOccurrencesOfString</span>:@&#8221;&#8216;&#8221; <span style="color:#3333ff;"><span><span>withString</span></span></span>:@&#8221;"] <span style="color:#3333ff;">stringByReplacingOccurrencesOfString</span>:@&#8221;«&#8221; <span style="color:#3333ff;"><span><span>withString</span></span></span>:@&#8221;"] <span style="color:#3333ff;">stringByReplacingOccurrencesOfString</span><span>:@&#8221;»&#8221; <span>withString</span>:@&#8221;"];</span><br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ameyashetti.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ameyashetti.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ameyashetti.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ameyashetti.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ameyashetti.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ameyashetti.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ameyashetti.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ameyashetti.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ameyashetti.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ameyashetti.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ameyashetti.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ameyashetti.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ameyashetti.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ameyashetti.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ameyashetti.wordpress.com&amp;blog=7124780&amp;post=7&amp;subd=ameyashetti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ameyashetti.wordpress.com/2009/07/31/mailto-problem-string-stringbyaddingpercentescapesusingencodingnsasciistringencoding-return-null/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8f90d3750ed1737ad03df1eebf7b0c5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ameyashetti</media:title>
		</media:content>
	</item>
	</channel>
</rss>
