Normally, the UITableView is something like this:
[ cell 1 ]
[ cell 2 ]
[ cell 3 ]
[ cell 4 ]
But I want to mak
if you want use textLabel, you can use this:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:CellIdentifier];
}
cell.textLabel.frame = CGRectMake(0,0, cell.frame.size.width , cell.frame.size.width); // it's very important!!!You must set frame of textLabel, because you can have a problems with displaying you table;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
CGAffineTransform trans = CGAffineTransformRotate(CGAffineTransformIdentity, M_PI_2);
cell.textLabel.transform = trans; // rotating you caption;
cell.textLabel.text = @"tra-tata";
cell.textLabel.textAlignment = UITextAlignmentCenter;
return cell;
}