0
특정 UITableView 셀을 터치하면 링크로드를 시도하는 것만으로 새롭게 추가되었습니다.UITableViewCell 터치에서 URL을로드하는 방법
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:nil];
NSArray *deals = [dic objectForKey:@"deals"];
NSDictionary *dealOne = [deals objectAtIndex:0];
NSString *url = [dealOne objectForKey:@"url"];
UITouch *touch = [[event allTouches] anyObject];
if([touch isKindOfClass:[UITableViewCell class]])
{
UITableViewCell *cell;
CGPoint location = [touch locationInView: self.view];
cell.center = location;
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
}
NSLog(@"TABLECELL TOUCHED");
}
는, jQuery과 이미 터치 감지 위임이 - (무효)있는 tableView : (jQuery과 *)있는 tableView didSelectRowAtIndexPath : (NSIndexPath *) indexPath.이 메서드에서는 [[UIApplication sharedApplication] openURL : [NSURL URLWithString : url]];을 호출 할 수 있습니다. – Raj