hi iam trying to implement a functionality like below images in - TopicsExpress



          

hi iam trying to implement a functionality like below images in iPhone..my requirement is if user enters any website URL link or you tube video URL link in text-view then i want to get(fetch) that URL title,description,base URL from link,and default image..then Ill display like as below images..am succeed with below code to fetch any url title.. but am unable grab description,base URL from link,and default image. NSError *error = nil; NSString *html = [NSString stringWithContentsOfURL:_textView.text encoding:NSASCIIStringEncoding error:&error]; if(html) { NSLog(@HTML %@, html); NSRange r = [html rangeOfString:@]; if (r.location != NSNotFound) { NSRange r1 = [html rangeOfString:@]; if (r1.location != NSNotFound) { if (r1.location > r.location) { NSString *title = [html substringWithRange:NSMakeRange(NSMaxRange(r), r1.location - NSMaxRange(r))]; NSLog(@title %@, title); lable = [[UILabel alloc]init]; lable.frame = CGRectMake(10, 40, 280, 30); lable.backgroundColor = [UIColor clearColor]; lable.text = title; lable.numberOfLines=2; lable.textColor=[UIColor redColor]; lable.font=[UIFont fontWithName:@Times New Roman size:14]; [youCell addSubview:lable]; } } } } if any one having any ideas plz share with me...thank in advance...
Posted on: Fri, 31 Jan 2014 05:32:24 +0000

Trending Topics



Recently Viewed Topics




© 2015