推奨されるすべての方法を試しましSOF
たが、それでも問題を解決できません。
これは私の中にありますUITableView didSelectRowAtIndexPath
if ([[[AryStoreknowItem objectAtIndex:indexPath.row] objectForKey:@"action"] isEqualToString:@"a9"]||[[[AryStoreknowItem2 objectAtIndex:indexPath.row] objectForKey:@"action"] isEqualToString:@"a9"]){
NSString *a9 = [[AryStoreknowItem objectAtIndex:indexPath.row] objectForKey:@"content"];
NSLog(@" url from XML; %@ ",a9);
webView *web=[[webView alloc]init];
[web viewDidLoad];//go to webView page
この行を選択すると、XML から URL が検出されて開きますUIWebView
が、機能しません。NSLog
show では、これらの URL を検出します。http://www.google.com
webView ページ;
#import "webView.h"
#import "inboxData.h"
@interface webView ()
@end
@implementation webView
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *a9 = [defaults objectForKey:@"a9"];
NSLog(@"URL from inboxData get from XML detect >>> %@",a9);
NSURL *url = [NSURL URLWithString:a9];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[self.webView loadRequest:requestObj];
}
誰でもこれを解決する方法を教えてもらえますか?