isLeft = 0;
- (IBAction)changeValues:(UISegmentedControl *)sender {
isLeft = sender.selectedSegmentIndex;
if (isLeft == 0) {
[self loadOutData];
}else {
[self loadOutData2];
}
}
一个表视图就可以了
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
if (isLeft == 0) {
return _outDataArray.count;
}else {
return _inDataArray.count;
}
}