本文共 843 字,大约阅读时间需要 2 分钟。
转载自: http://www.cppblog.com/walkklookk/archive/2012/12/29/196766.html
UIView *contentView = [cell.subviews objectAtIndex:0];
if (UIDeviceOrientationIsLandscap
{
contentView.frame = CGRectMake(0, 0, 480, cell.frame.size.height);
}
else {
contentView.frame = CGRectMake(0, 0, 320, cell.frame.size.height);
}
第三种:
不使用自定义的cell,而是使用普通的cell,
注意:这种方法我没有试验过,不知道是否可以,只是猜测而已。