При выборе и сохранении одной из моих пользовательских ячеек для таблицы в обычном стиле UITableView
, в этом случае отображается мой пользовательский цвет выбора (redColor
), но тогда, если я его удерживаю и прокрутки, цвет пользовательского выбора и обычай фон утрачивается (показывая через к UIImageView
за столом.Пользовательский фон UITableViewCell становится прозрачным после выбора
UITableView
создается в IB и имеет фон набор для clearColor
, чтобы позволить изображение, чтобы показать через.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
reuseIdentifier:kCellIdentifier]
autorelease];
cell.selectionStyle = UITableViewCellSelectionStyleBlue;
/* Background */
cell.backgroundView = [[[UIImageView alloc] init] autorelease];
cell.selectedBackgroundView = [[[UIImageView alloc] init] autorelease];
}
cell.backgroundView.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"customBackground"]];
cell.selectedBackgroundView.backgroundColor = [UIColor redColor];
return cell;
}
Может ли кто-нибудь помочь? Благодаря!