任何人都可以帮我解决这个问题
我的代码:
NSMutableArray *listVC = [[NSMutableArray alloc] init];
HMScrollView *scrollView = [[HMScrollView alloc] initWithFrame:self.showView.bounds];
for (int i = 0; i < newsArray.count; i ++) {
self.theNewDetailViewController = [[NewDetailViewController alloc] initWithNibName:@"NewDetailViewController" bundle:nil];
self.theNewDetailViewController.abmObj = (AboutUS_MobileService*)[newsArray objectAtIndex:i];
[self.theNewDetailViewController.view setFrame:CGRectMake(2, 0, scrollView.frame.size.width-4, scrollView.frame.size.height)];
[listVC addObject:self.theNewDetailViewController];
[self addChildViewController:self.theNewDetailViewController];
[self.theNewDetailViewController didMoveToParentViewController:self];
}
[scrollView setData:listVC atIndex:index];
[self.showView addSubview:scrollView];
[self.showView bringSubviewToFront:self.imageHeader];