tags:

views:

135

answers:

1

I want to show concentric charts of google api in iphone, but the imageData varible returns null value and image does not loaded from url to image view

this is code:

NSData *imageData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://chart.apis.google.com/chart?cht=pc&chd=t:120,45|120,60,50,70,60&chs=300x200&chl=||helo|wrd|india|pak|ban&chco=FFFFFF|FFFFFF,e72a28|a9d331|ffce08|8a2585|184a7d"]];

NSLog(@"%@",imageData); UIImage *myimage = [[UIImage alloc] initWithData:imageData];

self.myImageView.image=myimage;

please any one help me to overcome on this problem

+2  A: 

used url string encoding method to recover from this problem,

like this-

NSString *str=@"your respected url";

NSString *myurl=[str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

Mayur Birari
unfortunately ,answer given by me,becoz no noddy respond to my questions .i wait and find out solution myself
Mayur Birari