In my RSS feed reader project, I wanted to display the article content with all the HTML features. Rather than showing the original web page, I decided to have a custom template to show the content on my iOS application.
NSString *bodyContent = [[NSString alloc]initWithFormat:@"%@",[self.currentPostInfo objectForKey:@"fItemContent"]];wView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320,370)];wView.backgroundColor = [UIColor whiteColor];[self.view addSubview:wView];NSString *html = [[NSString alloc]initWithFormat:@".kish {font-size:18px;font-family:Geneva;}.kish img {max-width:300px;height:auto;float:right;margin:5px 5px 5px 10px;} .kish p {font-size:16px;}<title>The Meaning of Life</title><h1>%@</h2>%@",[self.currentPostInfo objectForKey:@"fItemTitle"], bodyContent];[wView loadHTMLString:html baseURL:[NSURL URLWithString:@""]];Some of the variables in this code is from my Project, so do not get confused.
- How to get the first image URL from NSString ? : I am working on a RSS...
- Loading Custom Nib Files on Start Up : Like every application in iOS, we...
- Creating a Widget for Displaying Random Category Post : I just created a small hack...
- Custom Twitter Page for WordPress Blog : I have recently updated the Twitter...
- Best Firefox Add-ons: Copy As HTML Link : If you are a blogger or...
Tweet Samsung Galaxy Note Rom is available for download, but this is only for AT&T users (This ...
Tweet I am currently using a Samsung Galaxy Note and I was using an iPhone 4 and an iPad 2 along wit...