i`m пытается построить представление таблицы с текстом субтитров в клеткахсубтитры выравнивания в UITableViewCell
проблема, когда я пытаюсь установить выравнивание субтитров текста справа он не работает, но это отлично работает с основным текстом
вот мой код
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"CustomCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
}
[[cell textLabel] setTextAlignment:UITextAlignmentRight];
[[cell detailTextLabel] setTextAlignment:UITextAlignmentRight];
cell.textLabel.text = [array objectAtIndex:indexPath.row];
cell.textLabel.font = [UIFont systemFontOfSize:18];
cell.detailTextLabel.text = @"test";
return cell;
}
когда я удалить код субтитров выравнивание работает отлично
любую идею?
Thanx Man, то больш :) – aLFaRSi
@ H.aLFaRSi дайте мне знать, если я могу помочь в чем-нибудь :) – self
@AlbrahimZ спасибо человеку вы были великолепны :) – aLFaRSi