0
私は、IPhoneアプリケーションにUIsegment Controlを配置しました。この機能を持つページをロードするには - (void)segmentSelected:(id)segmentedCntl { NSLog(@ "Selected Segment Index =% d "、[segmentedCntl selectedSegmentIndex]);
int index = [segmentedCntl selectedSegmentIndex];iPhoneアプリケーションのセグメント化されたコントロール
ViewController *viewController = (ViewController *) controller;
NSString *xPath = [NSString stringWithFormat:@"item[%d]/a", (index + 1)];
NSArray *items = [element nodesForXPath:xPath error:nil];
if([items count] > 0){
CXMLElement *itemElement = (CXMLElement *) [items objectAtIndex:0];
NSString *url = [[itemElement attributeForName:@"href"] stringValue];
NSLog(@"url is &&&&&&&&&&&&&&&& %@", url);
if([url startsWith:@"#"]){
}else{
NSString *fullURL = [URLLoader getURL:url];
if(fullURL != nil){
if([fullURL contains:@"?"]){
fullURL = [fullURL stringByAppendingString:@"&iPhoneMode=app"];
}else{
fullURL = [fullURL stringByAppendingString:@"?iPhoneMode=app"];
}
[viewController showURL:fullURL cacheDuration:kPageCacheDuartion];
}
}
}
}しかしsegmentControlは、私はこの問題を解決するのに役立ちclickable.Pleaseない