我有一个tableview,每个单元格都是屏幕大小。分页已启用。我正在使用以下代码在加载tableview时显示特定的单元格:
- (void)viewDidLoad
{
[super viewDidLoad];
[self.myTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:picID] atScrollPosition:UITableViewScrollPositionMiddle animated:NO];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return [URLstringArrays count];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 1;
}
我从另一个控制器传递picID但是tableview没有在指定的部分启动。什么可能是错的?感谢