ねえ、これはrootviewcontroller.m(rssページ)の私のコードです
NSDictionary* storyLink = [[stories objectAtIndex: storyIndex] objectForKey: @"link"];
// clean up the link - get rid of spaces, returns, and tabs...
storyLink = [storyLink stringByReplacingOccurrencesOfString:@" " withString:@""];
storyLink = [storyLink stringByReplacingOccurrencesOfString:@"\n" withString:@""];
storyLink = [storyLink stringByReplacingOccurrencesOfString:@" " withString:@""];
NSLog(@"link: %@", storyLink);
browserScreen=[[BrowserViewController alloc] initWithNibName:@"BrowserViewController" bundle:nil];
browserScreen.storyLink =[[stories objectAtIndex: storyIndex] objectForKey: @"link"];
[self.view addSubview:browserScreen.view];
これによりWebViewページが開きますが、要求したURLはロードされません。これが私のBrowserViewController.msviewDidloadページです(Webビューと私も.xibファイルにパッチを当てました)
- (void)viewDidLoad
{
[super viewDidLoad];
// NSString *urlAddress = storyLink;
NSString *urlAddress = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"storyLink"];
//Create a URL object.
NSURL *url = [NSURL URLWithString:urlAddress];
//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//Load the request in the UIWebView.
[webView loadRequest:requestObj];
// Do any additional setup after loading the view from its nib.
}
私はそれについて必死に感じているので誰かが助けてくれることを願っています