Я работаю в приложении для iPad. Я использую UITableView
для создания таблицы и вставки 2 UIImageView
s в каждую ячейку. Я попытался установить изображение как в UIImageView
s, а в значениях индексного пути начиная с 0,1,2,3,4 и т. Д.Проблема с UITableView в iPad?
Каждый UIImageView
имеет одинаковое изображение в первой ячейке. Как исправить эту проблему?
Пример:
- (void)viewDidLoad
{
[super viewDidLoad];
// ImageArray have 5images;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [ImageArray count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
imgView1.image = [imageArray objectAtIndex:indexPath.row];
imgView2.image = [imageArray objectAtIndex:indexPath.row];
}
где U установлен UIImageView, я имею в виду, что он установлен в cell.contentView ??? – iPatel
Формат, который вы задаете –
, и wt u хотите отображать на выходе? – iPatel