Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

macroshan

macrumors newbie
Original poster
Mar 19, 2009
2
0
Hello,

I have to separate the tokens from the contents of URL
But didnt get the required result
Following are the code lines
Any help will be appreciated!! I am new to iphone...
So please help!!!

NSURL *url = [NSURL URLWithString:mad:"http://example.com//sample.php"];
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:url];

NSError *error=NULL;

NSData *result = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&response error:&error];

NSDictionary *dictionary = [[CJSONDeserializer deserializer] deserializeAsDictionary:result error:&error];

NSMutableString *rowData;
int i;

for ( i=0 ; i < [[dictionary objectForKey:mad:"question"] count] ; i++)
{
[rowData appendFormat:mad:"%@ \n",[[[ dictionary objectForKey:mad:"question"] objectAtIndex:i] objectForKey:mad:"title"]];
}

[QLabel setText:rowData ];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.