2014-12-17 3 views
0

horizantal table view 스크롤링과 함께 app에 문제가있었습니다. custom tableviewcell을 사용하여 tableview 셀을 만들었습니다. custom tableviewcell에서 tableviewcells 및 tableview 헤더로 tableviewcell을 한 개 더 만들었습니다. tableview를 변형했습니다. 하고있는 tableview 세포하지만 회전 후 나는 테이블 view.Here의 프레임을 변경할 수 없습니다 오전 내가 지금까지 무엇을 사용 코드 ...Horizantal tableview 셀 스크롤 iOS

- (void)viewDidLoad { 
[super viewDidLoad]; 

//self.ibTableView.estimatedRowHeight = 568.0f; 
self.ibTableView.transform=CGAffineTransformMakeRotation(-M_PI/2); 
self.ibTableView.backgroundColor=[UIColor clearColor]; 
self.ibTableView.pagingEnabled=YES; 
self.ibTableView.showsVerticalScrollIndicator=NO; 

// Do any additional setup after loading the view.} 

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 
SPCustomTableVIewCellTableViewCell *cell = (SPCustomTableVIewCellTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"cell"]; 

if (cell == nil) { 
    cell = (SPCustomTableVIewCellTableViewCell *)[SPCustomTableVIewCellTableViewCell loadFromNib]; 
} 

[tableView dequeueReusableCellWithIdentifier:@"cell"]; 
cell.transform=CGAffineTransformMakeRotation(M_PI/2); 
cell.backgroundColor = [UIColor clearColor]; 
return cell;} 

어떤 도움

- (void)awakeFromNib { 

self.headerView = [HeaderTableView loadFromNib]; 
self.internalTableView.tableHeaderView = self.headerView; 
// Initialization code} 
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 

InternalCustomTableViewCell *cell = (InternalCustomTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"cell"]; 

if (cell == nil) { 
    cell = (InternalCustomTableViewCell *)[InternalCustomTableViewCell loadFromNib]; 
    [tableView dequeueReusableCellWithIdentifier:@"cell"]; 
} 
cell.backgroundColor = [UIColor clearColor]; 
return cell; } 

SPCustomTableVIewCell.m

하십시오이다 문제를 해결하기 위해

답변

0

당신이있는 UITableViewCell에 애니메이션을 적용 할 경우 테이블 뷰의 변환 후 프레임을 설정하려면, 당신은 내가 그것을 cellForRowAtIndexPath에서이 작업을 수행하는 나쁜 솔루션입니다 생각

- (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath

를 사용해야합니다.