-2

i want to have one table view same this


row0

row1


row2

row3


row4

row5

but now with this code i have this tableview i konw i have change in numberOfRowsInSection part but i dont konw how

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{

    return items.count/2;

}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

    return 2;

}

row1

row2


row1

row2


row1

row2

1

1 Answer 1

1

NSIndexSet (or NSMutableIndexSet) might be what you are looking for. It "contains" other "numbers/indices" but its count is the number of items it contains regardless of the value/range of those items.

See Apple's documentation. See This SO question and This answer why NSIndexSet might not be appropiate.

Not the answer you're looking for? Browse other questions tagged or ask your own question.