0
陣列I可以按下按鈕加載Web視圖這樣加載網頁形成iphone
-(void)buttonEvent:(UIButton*)sender{
NSLog(@"new button clicked!!!");
if (sender.tag == 1) {
NSLog(@"1");
}
if (sender.tag == 2) {
NSLog(@"2");
NSString *path;
NSBundle *thisBundle = [NSBundle mainBundle];
path = [thisBundle pathForResource:@"index2" ofType:@"html"];
NSURL *instructionsURL = [[NSURL alloc] initFileURLWithPath:path];
[webView loadRequest:[NSURLRequest requestWithURL:instructionsURL]];
}
}
,但我想從我的字符串加載路徑值NSString *filepat=[listItems objectAtIndex:2];
,其值是TAB0/index1.html其中TAB0是一個文件夾
所以如何從字符串加載plz幫助
感謝