I am currently working on my application and want to have UIScrollView and UIPageControl, which will allow the user to scroll left and right to access various view controllers.
I have this job so far, so that I can scroll left and right to see any view controller, but I find that when one of my UIViewControllers needs to access it, nothing happens, like UITableViewDelegate.
This is the code that I have in my scrollViewController
CGRect frame2;
frame2.origin.x = self.scrollView.frame.size.width * 1;
frame2.origin.y =30;
frame2.size = self.scrollView.frame.size;
myViewController *vc3 = [[myViewController alloc] initWithNibName:@"myViewController" bundle:nil];
vc3.view.frame = frame2;
[self.scrollView addSubview:vc3.view];
self.scrollView.contentSize = CGSizeMake(self.scrollView.frame.size.width * 2, self.scrollView.frame.size.height);
One thing I cannot do is release [vc3 release]; after adding it to scrollView, the application will just work.
, , , , .