2011-10-07 5 views
2

간단한 UITableViewCell에 UILabel을 추가했지만, 가로로 장치를 회전하면 UILabel이 오른쪽으로 이동하지 않습니다. myLabel.autoresizingMask = UIViewAutoResizingFlexibleRightMargin;이더라도 UITableViewCell의 중간에 있습니다. 세로 모드에서 myLabel은 UITableViewCell의 오른쪽에 있습니다. 다음은 코드입니다.UITableViewCell의 UILabel autoresizingMask

myLabel = [[UILabel alloc] initWithFrame:CGRectMake(252, 12, 60, 20)]; 
myLabel.font = [UIFont fontWithName:@"Helvetica" size:11]; 
myLabel.textColor = tableViewCell.detailTextLabel.textColor; 
myLabel.autoresizingMask = UIViewAutoresizingFlexibleRightMargin; 
myLabel.highlightedTextColor = [UIColor whiteColor]; 
myLabel.text = video.duration; 
myLabel.tag = 999; 
[cell.contentView addSubview:durationLabel]; 
[myLabel release]; 

가로 모드로 장치를 회전 할 때이 UILabel을 셀의 오른쪽으로 이동하는 방법은 무엇입니까? 당신이 오른쪽으로 이동하려면

답변

5

, 당신은 당신을 감사 (왼쪽 마진이 증가하기 때문에) 내가 볼

+0

UIViewAutoresizingFlexibleLeftMargin을 설정해야 –

관련 문제