사실, 한 뷰에서 다른 뷰로 데이터를 푸시하고자합니다. 그 위에 이미지가있는 UIScrollView 있어요. 이제 내가 그 이미지보기를 터치 할 때마다 위치를 선택하고 다른보기로 위치를 옮기고 싶기 때문에 그 뷰에서 다른 뷰로 데이터를 밀어 넣고 싶습니다. UIScrollView에는 navigationController가 없으므로이를 밀어 올릴 수 없습니다.touchesBegan을 UIScrollView에서 UIViewController로 전달하는 방법
UIScrollView는 UIViewController 클래스 위에 있습니다. UIScrollView에서 UIViewController 클래스로 UITouch를 보내고 그 클래스가 뷰를 밀어 붙이도록하거나, 어떤 것을 해결해야만 할 수 있습니까?
나는있는 UIScrollView 클래스의 다음 코드ImageScrollView.m
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *t = [touches anyObject];
CGPoint touchInScrollView = [t locationInView:imageView];
NSLog(@"x: %f", floor(touchInScrollView.x));
NSLog(@"Y : %f", floor(touchInScrollView.y));
/****Cant be done since pushViewController is not allowed in UIScrollView.****/
DetailViewController *newView = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil];
[self.navigationController pushViewController:newView animated:YES];
}